• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Intro and Can this be done?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intro and Can this be done?


  • Subject: Re: Intro and Can this be done?
  • From: "Marc K. Myers" <email@hidden>
  • Date: Thu, 01 Feb 2001 15:43:43 -0500
  • Organization: [very little]

Ariel wrote:
> Date: Thu, 1 Feb 2001 11:12:20 -0800
> To: email@hidden
> From: Ariel <email@hidden>
> Subject: Intro and Can this be done?
>
> [Snip!]
>
> 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.

I don't know how to do it in AppleWorks, but I do a lot of similar
things in Tex-Edit Plus, a shareware text editor. You can cut styled
text from AppleWorks WP and paste it into an empty TE+ window. From
there it would be very easy to have TE+ search out each italicized word
and add it to a list in a separate document, from which you could
compile your glossary. This script assumes that you have your
document-as-styled-text open in a TE+ window:

tell application "Tex-Edit Plus"
if not (exists window 1) then
tell me
activate
display dialog "I need something to work " & [optn-L]
"on!" buttons {"Cancel"} default button 1
end tell
end if
make new window at after window 1
set foundIt to (search window 1 looking for [optn-L]
"^*" looking for styles {style:{italic}})
repeat until not foundIt
copy selection & return to after the contents of window 2
set foundIt to (search window 1 looking for [optn-L]
"^*" looking for styles {style:{italic}} [optn-L]
finding next with searching from cursor)
end repeat
end tell

Where you see "[optn-L]", use the AppleScript continuation character,
which you get with that keyboard combination.

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[2/1/01 3:43:18 PM]


  • Follow-Ups:
    • Re: Intro and Can this be done?
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Current hour and minute
  • Next by Date: Can a script create an applet?
  • Previous by thread: Intro and Can this be done?
  • Next by thread: Re: Intro and Can this be done?
  • Index(es):
    • Date
    • Thread