Highlighting scripts Posted by Gail on Feb 25, 2012
I wondered if anyone out there had a good way to automate highlighting scripts with the computer? The highlight functions are tedious and I wanted to write a macro that would automatically highlight my scripts for each character's part. I thought maybe someone else has figured that out, if so I would love to hear how you did it.
Re: Highlighting scripts Posted by Na on Feb 26, 2012
What program are you using? If it's Word, often it 'learns' your formatting after a while.
Re: Highlighting scripts Posted by Shawn on Feb 26, 2012
Since you referenced macro I assume like Na that you are using Word. Word uses a scripting language called Visual Basic for it's macro's. I am not real familiar with this language but do know it follows some of the same basic principles as other languages.
The first thing to think about is how you are actually going to write your script. As a rule in a script each characters lines are prefaced with their character name.
Now that you have that you need to dig in a learn Visual Basic so you can write your own macro! Easy right! Have a look at this http://www.pcreview.co.uk/forums/word-select-text-search-delete-macro-t3868065.html He was deleting text but it does explain the wild card you use to find different text between your starting point and ending point In VB. Here is another example that is about highlighting. http://www.techrepublic.com/forum/questions/101-237448/looping-macro-to-find-highlight-text-strings-pulled-from-arraycollectio I am pretty sure the below code is what is used to highlight.
[code]Selection.Range.HighlightColorIndex = wdYellow[/code]
This looks like it may be a good reference site for VB. http://technet.microsoft.com/en-us/scriptcenter/dd940112
I get the feeling you might be thinking that highlighting by hand is faster at this point and I think I would have to agree with you.
It is possible but there is nothing out there that I know of already that does this.
The first thing to think about is how you are actually going to write your script. As a rule in a script each characters lines are prefaced with their character name.
John: Hello Jane.It would be pretty easy in something like the above to create a macro to look for say John: and change it's color or highlight it but if you wanted to change color or highlight John's name and what he says it would be a bit harder. In order to do that you need a way to communicate to the computer not only where to start but where to end. We know that we can tell it that the start is John: but we need to figure out a way to tell it where to stop. A period won't work because more then likely there is going to be more then one sentence. Same thing for paragraphs. We could always put something like :nhoJ at the end of his dialog which is the opening backwards. Now we have an opening and closing tag so to speak just like in HTML or when you use BBcode here on your forum post.
Jane: Hello John.
Now that you have that you need to dig in a learn Visual Basic so you can write your own macro! Easy right! Have a look at this http://www.pcreview.co.uk/forums/word-select-text-search-delete-macro-t3868065.html He was deleting text but it does explain the wild card you use to find different text between your starting point and ending point In VB. Here is another example that is about highlighting. http://www.techrepublic.com/forum/questions/101-237448/looping-macro-to-find-highlight-text-strings-pulled-from-arraycollectio I am pretty sure the below code is what is used to highlight.
[code]Selection.Range.HighlightColorIndex = wdYellow[/code]
This looks like it may be a good reference site for VB. http://technet.microsoft.com/en-us/scriptcenter/dd940112
I get the feeling you might be thinking that highlighting by hand is faster at this point and I think I would have to agree with you.
It is possible but there is nothing out there that I know of already that does this.
Re: Highlighting scripts Posted by Gail on Mar 03, 2012
Ok I have done some research. Am using Word and for macros I record the formatting changes to write the VBA code. I used to use the highlight colors but my newer version of Word only has very dark highlight choices that when printed use too much ink and are too dark. I only want a very light grey shading and I bold the lines too, that seems to work best for us. We only highlight one person's parts per script so I don't have to use different higlights. Unfortunately the for lighter shading you cannot highlight the whole doc and clear it out, you have to undo it one line at a time. So it works best to create a new script from Save As template for the next person's script. It takes me a long time to highlight all the scripts each week. Someone showed me how to use hanging indent feature so that the wrapped text is indented to the right and the character names only are on the left. That way I only use the carraige return at the end of someone's lines. I found a code ^13 that worked in the FIND What: to find the end of my lines. So I enabled wildcards check box in Find dialogue and used FINd What: Host:*^13 and it found all the whole lines of the Host. The trouble I am having is with the replace box. I put the cursor in that empty replace box and then select format Bold and format highlight. The first time I did that it worked perfectly to highlight the whole lines of all the Host parts, but since then each time I try it only bolds and does not highlight anymore. I am so close, once I get this figured out I can record a macro using each name to do it all on the click of one button....I hope.
Re: Highlighting scripts Posted by Na on Mar 03, 2012
Here's a thought: have you tried a different program?
I bought myself a new computer last week, and was annoyed to find only a trial version of Microsoft Office installed. I decided instead of paying for a program, I'd download Open Office instead. http://www.openoffice.org/
It's not only free, but is open source; meaning you could actually code or get someone to code, a solution for you. And of course, you can open all Word docs in the program too.
I've not had much of a look to see what functions are available in terms of macros with it, but it might be easier to use than Word which only does what it says on the box.
I bought myself a new computer last week, and was annoyed to find only a trial version of Microsoft Office installed. I decided instead of paying for a program, I'd download Open Office instead. http://www.openoffice.org/
It's not only free, but is open source; meaning you could actually code or get someone to code, a solution for you. And of course, you can open all Word docs in the program too.
I've not had much of a look to see what functions are available in terms of macros with it, but it might be easier to use than Word which only does what it says on the box.
Re: Highlighting scripts Posted by Rikka on Mar 03, 2012
You just have to save as Word document if you want to mail it to someone without Open Office, they are using a different format normally. You can save Open Office documents in the Word format, but it is not recommended since formatting errors may accure. Otherways I am very satisfied with Open Office, but I do exchange texts with my sister once in a while and she has Word installed. Open Office reads Word documents without problems as far as I can tell.
Re: Highlighting scripts Posted by Na on Mar 04, 2012
Yes, sorry I should have mentioned that. Thanks Rikka.
Re: Highlighting scripts Posted by Rikka on Mar 04, 2012
No problem, you have like 9 million things on your mind I I just experienced that kind of thing, so it was really on top of my brain...
Re: Highlighting scripts Posted by Shawn on Mar 04, 2012
You should be able to open up the VB and see the actual "text" or code. If you could show me that I might be able to help you figure out what the issue is.
The other option would be to write two macros. One to bold and then one to highlight.
The other option would be to write two macros. One to bold and then one to highlight.
Re: Highlighting scripts Posted by Gail on Mar 04, 2012
I am working on recording the VBA should have something soon. My thought on posting here was that maybe some poor soul had been thru this and already had a program available. Looks like we have to figure it out on our own.
Loading
No More Post
Error
Loading