Re: Intro and Can this be done
Re: Intro and Can this be done
- Subject: Re: Intro and Can this be done
- From: Ken Dobson <email@hidden>
- Date: Thu, 01 Feb 2001 21:46:57 -0500
>
> Anyway, I have a question for the list. Right now I am finishing up
>
> a glossary for my novel. I need to go through my entire novel and
>
> look for italicized foreign words. I am using AppleWorks and saw the
>
> applescript to change all lower case into uppercase. So I was hoping
>
> I could write a script to either look for the italicized words and
>
> stop each time one is found or, probably easier, just change all the
>
> italicized words into bold red ones (and another script to change
>
> them back again later). This would make my work for the glossary
>
> much easier.
>
>
>
> [Snip!]
>
>
>
> Can anybody point me in the right direction to find out how
>
> AppleWorks formatting characteristics would be coded in applescript?
>
>
>
> Thanks so much ahead of time.
Now this has me a bit upset
I found this problem simple enough to solve in MS Word, a look through the
dictionary and a couple of minutes watching my script in the event log and I
was able to compile the following:
--
tell application "Microsoft Word"
activate
repeat with i from 1 to count of words of window 1
if word i is italic then
set italic of word i to false
set bold of word i to true
set color of word i to red
set highlight of word i to yellow
end if
end repeat
save window 1
end tell
--
What has me scratching my head is that I couldn't get close to this in
AppleWorks. As a matter of fact the script, no matter the syntax I used,
would bomb out at the count message. I am even further surprised that
AppleWorks, as far I am getting here isn't recordable!
Applescript... AppleWorks.. something wrong here....