• 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
who owns the dialog box from a print command?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

who owns the dialog box from a print command?


  • Subject: who owns the dialog box from a print command?
  • From: Jim Brandt <email@hidden>
  • Date: Sat, 17 Aug 2013 11:13:59 -0500


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
 _______________________________________________
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: who owns the dialog box from a print command?
      • From: Luther Fuller <email@hidden>
    • Re: who owns the dialog box from a print command?
      • From: "koenig.yvan" <email@hidden>
  • Prev by Date: Re: Recording AppleEvent Class Codes
  • Next by Date: Re: who owns the dialog box from a print command?
  • Previous by thread: Re: Recording AppleEvent Class Codes
  • Next by thread: Re: who owns the dialog box from a print command?
  • Index(es):
    • Date
    • Thread