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

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


  • Subject: Re: Selecting a pop up button value in a Print dialog
  • From: Yvan KOENIG <email@hidden>
  • Date: Fri, 12 Mar 2010 12:19:31 +0100


Le 12 mars 2010 à 09:59, Jim Brandt a écrit :


On Mar 11, 2010, at 10:40 AM, Axel Luttgens wrote:

Yes: it's always a good idea to provide some info about the context. ;-)

So, 10.4.11.
The print sheet displayed by Safari (and provided by the system) has another layout, so that the pop up button of interest is the second one.
On the other hand, it seems that it is mandatory for the target application to be active.
As a result, this one seems to do the job here, with Safari 4.0.3:

tell application "Safari" to activate
tell application "System Events"
tell application process "Safari"
tell front window
tell front sheet
tell pop up button 2
-- Display the local menu
perform action "AXPress"
tell menu 1
-- Q2: get available "values"
name of menu items
-- Q1: select an option (here, "Save as
")
tell menu item "Enregistrer sous
"
perform action "AXPress"
end tell
end tell
end tell
end tell
end tell
end tell
end tell


It's normal that the script doesn't work.
The title of the menu item is wrong.

In English it's not "Save as" but "Save as…"
In French it's  not "Enregistrer sous" but "Enregistres sous…"
Don't type three periods but the character ellipsis.

Yvan KOENIG (VALLAURIS, France) vendredi 12 mars 2010 12:19:26


 _______________________________________________
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: Selecting a pop up button value in a Print dialog
      • From: Luther Fuller <email@hidden>
    • Re: Selecting a pop up button value in a Print dialog
      • From: Axel Luttgens <email@hidden>
References: 
 >Re: Selecting a pop up button value in a Print dialog (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: Selecting a pop up button value in a Print dialog
  • Next by Date: EPS to PDF Watch Folder Dilemma - Update
  • Previous by thread: Re: Selecting a pop up button value in a Print dialog
  • Next by thread: Re: Selecting a pop up button value in a Print dialog
  • Index(es):
    • Date
    • Thread