• 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: GUI TextEdit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: GUI TextEdit


  • Subject: RE: GUI TextEdit
  • From: Rick Gordon <email@hidden>
  • Date: Fri, 1 Jun 2007 23:21:43 -0700

Title: RE: GUI TextEdit
Why not just forget the System Events, and tell document 1 to save as "HTML"

From TexttEdit's dictionary:

save v : Save an object.
        save reference : the object for the command
             [as Unicode text] : The file type in which to save the data.
            [in alias] : The file in which to save the object.

------------------

On 6/1/07 at 5:10 PM -0400, Michael Ghilissen wrote in a message entitled
"GUI TextEdit":

Hi list,

I am struggling with the following script, trying to Save a TextEdit document as HTML. Can some one point me in the right direction?

Thanks much,

Michael

tell application "TextEdit" to activate
tell application "System Events"
        tell application process "TextEdit"
                click menu item "Save As..." of menu 1 of menu bar item 3 of menu bar 1 -- menu item 7
                click menu item "HTML" of menu 1 of pop up button 1 of group 1 of sheet 1 of window 1 -- menu item 2
                click button "Save" of sheet 1 of window 1 -- save file
        end tell
end tell

--
 
___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW:   http://www.shelterpub.com
 _______________________________________________
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

  • Follow-Ups:
    • Re: GUI TextEdit
      • From: Michelle Steiner <email@hidden>
References: 
 >GUI TextEdit (From: Michael Ghilissen <email@hidden>)

  • Prev by Date: Re: list-building performance
  • Next by Date: Re: GUI TextEdit
  • Previous by thread: GUI TextEdit
  • Next by thread: Re: GUI TextEdit
  • Index(es):
    • Date
    • Thread