Re: TextEdit script (Applescript-users Digest, Vol 2, Issue 471)
Re: TextEdit script (Applescript-users Digest, Vol 2, Issue 471)
- Subject: Re: TextEdit script (Applescript-users Digest, Vol 2, Issue 471)
- From: Jonathan Levi MD <email@hidden>
- Date: Tue, 19 Jul 2005 00:17:58 -0400
On Mon, 18 Jul 2005 21:05:19 -0400, I ("Jonathan
Levi, M.D." <email@hidden>) wrote:
On 18 Jul 2005 05:08:40 -0700, "B2 Fass-Holmes" <email@hidden> wrote:
> Could someone please explain to me what is
> defective in the following AppleScript [to set
> font and size of TextEdit's front doc's selection to
> "Lucida Grande" and 11, resp.]
Here's a partially-tested idea that uses
GUI-scripting to achieve the same object (I
assume your TextEdit document is rtf...)
...
The AppleWorks part of my solution can be done
more quickly and simply without GUI scripting;
the whole script is now:
tell application "TextEdit" to activate
tell application "System Events" to ¬
tell process "TextEdit" to click menu item "Copy" of ¬
menu "Edit" of menu bar 1
tell application "AppleWorks 6"
activate
make document with properties ¬
{document kind:text document}
tell front document
set text body to the clipboard
set text body's font to "Lucida Grande"
set text body's size to 11
copy to clipboard its text body
close saving no
end tell
--quit--uncomment ad libitum
end tell
tell application "TextEdit" to activate
tell application "System Events" to ¬
tell process "TextEdit" to click menu item "Paste" of ¬
menu "Edit" of menu bar 1
Jonathan
_______________________________________________
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