• 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
Scripting TextEdit, round II
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting TextEdit, round II


  • Subject: Scripting TextEdit, round II
  • From: Nelson Byrne <email@hidden>
  • Date: Thu, 11 May 2006 18:19:50 -0700

Thanks to all the help I got from this list I now have this kinda- working script.

The original goal was to set the size of the first character of (words in all caps whose length is > 1) to 24, and set the entire word to BOLD FACE.

I've had to scale it down to setting the size of the first character of all words whose text is "SUSANNA" to 24.

considering case
tell application "TextEdit"
get item 1 of (get documents whose name contains "ACT I") returning theDoc
tell theDoc
tell (its words where it is "SUSANNA")
set size of first character to 24
end tell
end tell
end tell
end considering


IT WORKS!


But it only kinda works because:

1) In spite of considering case, TextEdit sets the size of the first letter of *every* occurrence of the word "SUSANNA" to 24. Words like susaNNa get their first character sized to 24.

2)	How don I set the style of the selected word to BOLD?

3) I know, I know, one mustn't trust dictionaries too far, but Nisus Express and Pages seem to have very similar dictionaries, text-wise, to TextEdit but both *choke* on the above script! Which was inadequate anyway.

4) Classic Nisus handles the original task with no sweat at all. But Classic's gonna die some day, and then what will we do?

With great regards and high hopes,

Nelson Byrne
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: GUI Scripting Issue
  • Next by Date: ADG2
  • Previous by thread: Re: Some problems with FileMaker Pro 8
  • Next by thread: Re: Scripting TextEdit, round II
  • Index(es):
    • Date
    • Thread