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
|