Here's a script that ought to work but on my system I still get the previously mentioned error on the "click" line. Can anyone test this:

 tell application "System Events"
   tell process "TextEdit"
        set frontmost to true
click menu item "Print..." of menu "File" of menu bar 1 -- three full stops after "Print"
        -- or if this is too much, keystroke "p" with command down
        delay 1
click button "Save as PDFŠ" of UI element 4 of UI element 1 of window "Print" of window "untitled" -- ellipsis after "PDF"
        delay 1
        click button "Save" of window "Save to File"
   end tell
 end tell

You need to have a document open in TextEdit for it to work and you must be on OS 10.4. The script should save the document as a PDF without user interaction.

Thanks,

Marc
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to