be the change you want to see in the world
Posts tagged printer applescript
Start/stop printer queue with applescript
0544 days
This little applescript script will toggle the enabled/disabled status of your printer:
--be aware of the fact that HP LaserJet 5100 Series for example has the queue name HP_LaserJet_5100_Series(spaces replaced with _)
property lp_queue_name : "printer name"
on run
set isDisabled to do shell script ("lpstat -t | grep '" & lp_queue_name & " disabled'")
if isDisabled is not equal to "" then
do shell script ("/usr/bin/enable " & lp_queue_name & "; lprm -P \"" & lp_queue_name & "\" -E")
else
do shell script ("/usr/bin/disable " & lp_queue_name & "; lprm -P \"" & lp_queue_name & "\" -E")
end if
end run
