Re: GUI TextEdit (solved)
Re: GUI TextEdit (solved)
- Subject: Re: GUI TextEdit (solved)
- From: Laine Lee <email@hidden>
- Date: Tue, 03 Jul 2007 15:46:51 -0500
- Thread-topic: GUI TextEdit (solved)
On 06/2/07 3:13 AM, "Michael Ghilissen" <email@hidden> wrote:
> Thanks to Philip Aker's contribution:
>
> 1/ include delay to pace TE
> 2/ add a click on the pop up button, before selecting menu item "HTML"
>
> the following script now works:
>
> tell application "TextEdit" to activate
> tell application "System Events"
> tell application process "TextEdit"
> click menu item "Save As" of menu "File" of menu bar item "File" of menu bar
> 1 -- menu item 7
> click pop up button 1 of group 1 of sheet 1 of window 1
> delay 1
> click menu item "HTML" of menu 1 of pop up button 1 of group 1 of sheet 1 of
> window 1 -- menu item 2
> delay 1
> click button "Save" of sheet 1 of window 1 -- save file
> end tell
> end tell
>
I've watched this with thread with interest and I'm glad you solved it. I
thought I might just add that I took a slightly different approach so that I
could create a routine for saving part of a web page into a fresh one.
Granted that my solution certainly won't include all content, but for simple
text and images, it has proved fairly reliable. If you copy either just
styled text or a combination of text and images from a web page being viewed
in Safari, for example, you can run this script and you'll get a new html
file plus accompanying images on the desktop. The way it works is to let
TextEdit decide whether the source file should be created as rtf or rtfd,
then run that through textutil, which can generate the html from either.
http://lonestar.utsa.edu/llee/applescript/webpage_clippery.html
Laine Lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden