I was looking for a way to automatically set the default printer based on the location I am at (office/home), however I could not find a way to do it natively using system preferences. I ended up using a Keyboard Maestro macro that is triggered via the WIFI SSID. I’m sharing as I think it’s useful and free (if you already own KM).
You will need first to get the system names of your printers, you can do that using the Terminal command “lpstat -p”
Once done, you can use the KBM Macro below:
The AppleScript is: do shell script (“lpoptions -d EXAMPLE_PRINTER_NAME”)
Of course you will have to change the EXAMPLE_SSID to the name of the WiFi network you want to use to trigger the macro, and the EXAMPLE_PRINTER_NAME to the printer name after running “lpstat -p” on Terminal. You will need to create a separate macro in Keyboard Maestro for each location/WIFI network name trigger.
I hope you find this useful. If you know and easier way to do it please share. And as always, GO GREEN, only print if you really need to!