• 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
Revisited: Selecting a pop up button value in a Print dialog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Revisited: Selecting a pop up button value in a Print dialog


  • Subject: Revisited: Selecting a pop up button value in a Print dialog
  • From: Robert Poland <email@hidden>
  • Date: Fri, 14 May 2010 09:08:33 -0600

Hi,

I am trying to use this suggestion with Preview.

I get the error "Can't get menu button "PDF" of window 1 of process "Preview".

Is Preview too anti Applescript for this to work?

tell application "System Events"
-- UI elements enabled is true. Set manually.
tell process "Preview"
keystroke "p" using {command down}
delay 1
click menu button "PDF" of window 1 -- of sheet 1 of window 1
delay 1
click menu item "Save as PDF…" of menu of menu button "PDF" of sheet 1 of window 1
delay 1
click button "Save" of window "Save" -- save location has been manually set to Desktop
end tell
end tell



On Mar 10, 2010, at 7:36 AM, Luther Fuller wrote:

On Mar 10, 2010, at 8:03 AM, Jim Brandt wrote:

Is there a way to select an item of a pop up button in a print dialog sheet?

I recently wrote, Subject: UI Printing ...

On Mar 5, 2010, at 12:33 PM, Luther Fuller wrote:

Here's the script I'm using that works thanks to Bill Cheeseman's hints ...

set msgFile to alias "OS_X:Users:lutherfuller:Desktop:UI scripts:Kids Book Sale -- 4 Days Only! 0.emlx"
tell application "Mail"
activate
close every window
set download html attachments to true
open msgFile
set download html attachments to false
set winName to (name of window 1)
-- close window winName -- this command works here, but ...
delay 1
-------------------
tell application "System Events"
-- UI elements enabled is true. Set manually.
tell process "Mail"
keystroke "p" using {command down}
delay 1
click menu button "PDF" of sheet 1 of window 1
delay 1
click menu item "Save as PDF…" of menu of menu button "PDF" of sheet 1 of window 1
delay 1
click button "Save" of window "Save" -- save location has been manually set to Desktop
end tell
end tell
-------------------
close window winName -- but this command does NOT work.
end tell

Robert Poland - Fort Collins, CO



 _______________________________________________
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: Revisited: Selecting a pop up button value in a Print dialog
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Re: AppleScript-Users Digest, Vol 7, Issue 250
  • Next by Date: Re: Use the Find button in Numbers with Applescript.
  • Previous by thread: Re: AppleScript-Users Digest, Vol 7, Issue 250
  • Next by thread: Re: Revisited: Selecting a pop up button value in a Print dialog
  • Index(es):
    • Date
    • Thread