Re: Scripting TextEdit Save As HTML?
Re: Scripting TextEdit Save As HTML?
- Subject: Re: Scripting TextEdit Save As HTML?
- From: Jeff Porten <email@hidden>
- Date: Mon, 15 Aug 2005 23:29:29 -0400
On Aug 5, 2005, at 1:59 PM, Stephen Jonke wrote:
I've been trying to figure out how to tell TextEdit to save an RTF
file as an HTML file. I.e. like selecting Save As... and choosing
HTML as the output format - it converts to HTML, and rather nicely.
Is this not possible via AppleScript?
This will save the file under the existing filename with
extension .html in the default save location:
tell application "TextEdit" to activate
tell application "System Events"
tell process "TextEdit"
keystroke "S" using command down -- shift-command-S
delay 1
click pop up button 1 of group 1 of sheet 1 of window 1 --
file type selector
delay 1
key code 125 -- down arrow
delay 1
keystroke return -- select from menu
delay 1
keystroke return -- save file
end tell
end tell
_______________________________________________
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