I am having a problem completing a dialog.
The situation:
From Tex-Edit Plus, I want to save a print version as a PDF file on the desktop. After I have the file as I want it, here is the piece of the script that is supposed to do this:
tell application "System Events" to tell process "Tex-Edit Plus" click menu item "Print…" of menu 1 of menu bar item "File" of menu bar 1 repeat until exists sheet 1 of window WindowName delay 0.1 end repeat click menu button "PDF" of sheet 1 of window WindowName click menu item "Save as PDF…" of menu of menu button "PDF" of sheet 1 of window WindowName keystroke "D" using {command down} -- put it on the desktop click button "Save" of window "Save" end tell
The problem is the last line, click button "Save" of window "Save". That line is what UI Browser gave me as the AppleScript to select the save button. However, in OS X version 10.7, this window is a seperate dialog box, and the error I'm getting is:
System Events got an error: Can't get window "Save" of process "Tex-Edt Plus"
If this dialog box doesn't belong to Tex-Edit Plus, who does it belong to?
TIA,
Jim |