Hi,
I use a shell script to change my current printer. Is there a shell script that determines the cue name of the current printer? I use this script:
do shell script "lpoptions -d PDF_Writer"
tell application "Finale 2006d"
print theFile without print dialog
end tell
do shell script "lpoptions -d _Brother"
Why is it that you find what you’re looking for a few minutes after you’ve posted to a forum like this? ![:confused: :confused:](/images/emoji/apple/confused.png?v=12)
The solution is:
set Def_Printer to word 4 of (do shell script "lpstat -d")
This leads to a quick and easy way to switch printers:
set Def_Printer to word 4 of (do shell script "lpstat -d")
do shell script "lpoptions -d PDF_Writer"
-- Print things (without dialog)
do shell script "lpoptions -d " & Def_Printer