Open Add Printer... Window

How would I have applescript open the ‘Add Printer…’ window and make it the active window. I’m trying to mimic the functionality of the ‘Add Printer…’ option when you have the printer panel open (In any app that supports printer, do File > Print or cmd + p, then in the drop down for selecting which printer to use select ‘Add Printer…’).

I don’t want to use a GUI script because I can’t be sure the users of the script will have ‘Enable access for assistive devices’ turned on.

Any help would be greatly appreciated,
Thanks!

Hi,

do you mean

activate application "AddPrinter"

?

Hi nappin,

How about this command?


do shell script "open /System/Library/CoreServices/AddPrinter.app"

EDIT: StefanK’s solution is much better, it will also bring AddPrinter to the front :wink:

Yup, exactly what I meant hahah. Thanks it works perfectly!

I’m new to applescript (obviously), but how on earth did you figure that out without ‘just knowing’. I tried searching everywhere and the dictionaries usually end up confusing me more than helping :confused:

Indeed I knew it,
because in Leopard Apple has split “Printer Setup Utility” to a GUI-less version (the GUI is moved to System Preferences) and “AddPrinter”