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

Selecting a pop up button value in a Print dialog


  • Subject: Selecting a pop up button value in a Print dialog
  • From: Jim Brandt <email@hidden>
  • Date: Wed, 10 Mar 2010 08:03:30 -0600

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

I have a script that logs on to a web page and "prints" that page to a PDF file using the print dialog to save as PDF. One of my printer presets is a Grayscale option, and Preview saves the file without color. I'm able to detect that this option is set, via the following code, when the "Print" sheet is open:

tell application "System Events"
  tell process "Safari"
    set nm to name of front window
    set x to value of pop up button 2 of sheet "Print" of window nm

    ...

However this code does NOT work:

    if x contains "Grayscale" then
      set value of pop up button 2 of sheet "Print" of window nm to "Front tray-2 Side Color Economy 1"
    end if

So my questions:

1) Is there a way to select one of the other options of this pop up button?

2) Since these options vary from printer to printer based on saved options established by the user of the printer, is there a way to obtain all the possible available values?

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: Selecting a pop up button value in a Print dialog
      • From: CYB <email@hidden>
    • Re: Selecting a pop up button value in a Print dialog
      • From: Axel Luttgens <email@hidden>
    • Re: Selecting a pop up button value in a Print dialog
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Slow Command in Snow Leopard
  • Next by Date: Re: Selecting a pop up button value in a Print dialog
  • Previous by thread: Re: Trying to open just three items at a time (Stan Cleveland)
  • Next by thread: Re: Selecting a pop up button value in a Print dialog
  • Index(es):
    • Date
    • Thread