Selecting Different Printer With Apple Script.
Hi,
I am currently in the process of making a script to be able to print off labels without the need of much user input (read from a document or e-mail) and I want to be able to set the printer when it goes to the print screen.
this is the final apple script step in the application cmd+p brings up the 1st print menu the return takes it to the second print menu cmd+v pastes predifind by the user the ammount of copys they want
on run {input, parameters}
tell application "Labels & Addresses"
activate
tell application "System Events"
keystroke "p" using command down
delay 1
keystroke return
delay 1
keystroke "v" using command down
delay 1
tell application "System Events"
tell process "Labels & Addresses"
click (menu item whose description is "Printer")
click (menu item "Zebra Technologies ZTC GK420t" whose description is "Printer")
end tell
end tell
return input
end tell
end tell
end run
now there is chance to change the printer selection twice once in the 1st print screen and once in the 2nd print screen the only problem is im not sure how to apple script to select the right printer from the drop down menu, I got the code from a forum but I think it was old code as when I tested it it was returning errors so I modified it a bit and now it just struggles finding the menu item with description of printer.
Does anyone know what I would have to use for it to select the right printer? (The Zebra Technologies ZTC GK420t)
Help would be greatly appricited!
Thanks,
Bruce
P.S. sorry the code is a bit messy!
OS X Mavericks (10.9.2)