I am trying to automate the printing of postage labels from Safari. My printing is set up with the default printer being my laser printer, but I need to switch to the label printer to print the labels.
What Applescript code do I use to do this? I am unable to find this info with a Google search. I thought this would be a pretty standard thing people would be doing.
I need AppleScript to invoke the Print sheet, then choose an alternate printer. The label printer’s default preset is the one I want to use to print. I just need to get AppleScript to choose a different printer since Safari default to the laser printer each time the Print sheet is invoked.
The first solution worked perfectly. I saw that in the AppleScript library for Safari but I guess it wasn’t obvious to me that that was the command I was looking for.
Ultimately, this will be added into a Keyboard Maestro macro as I need to click various webpage buttons to bring up the PDFs to print, and I am pretty sure AppleScript can’t handle those.
I’d prefer to do it all within Applescript. The rest of the process is just bringing up the Print dialog, clicking Print, closing Safari tabs, and so on.