I am doing a project for work in which here on the campus it will automatically set up and add the university’s printer server to the Apple computer that it is on. So far I have only up to the point where it opens the Printer Setup Utility, and that’s about it.
What I need it to do next:
Click Add
While holding OPTION click “More Printers…”
Select “Advanced” under the drop down menu that pops up
Choose a particular option (SAMBA)
Enter info in the Device Name / Device URL by itself
Click Add
My problem is that I dont know how to get it to click the “More Printers…” part while holding the option key down. Does anyone know how to do this, or help me get started? I’m using a MacBook with Tiger.
While that definitely is close to what I"m looking for, I don’t know exactly what I need to modify or what I need to add for the scripts on that page to do what >>I<< need it to do… such as holding down Option while clicking Add Printer… changing the selection in the drop down menu box, etc etc…
Also, I need it to ask the user for the username and password for entering into this form as well…and then the program needs to input it into the form.
can anyone help me in adapting the code to do what I need?
-p is the name of the printer (1055CMBond)
-v is the URL of the printer, if you omit $username and $password, the user will be prompted
-P is the location of the PPD file
-E enables and activates the printer
Add a printer manually and take URL and PPD path from the info window.
If the SMB-path contains a space character, it also must be quoted
EDIT: It responds with “Printer name can only contain printable characters!”… continues to work anyway in terms of asking for my password to add, and adds it as a ‘Local Raw Printer’… I chose one of the random Laserjet.gz’s in the Library PPDs folder because I couldn’t find the Generic.ppd file… and the printer’s status is set to stopped instead of active… and it didn’t ask me for a user name / password …
the generic PPD is used in the script in the thread mentioned above.
I don’t know why, but lpadmin doesn’t like space characters in the name. Use underline characters instead
Oh ok. Well is the above lpadmin…blah blah blah for leopard then? Or coudl you help me with the GUI SCripting for Leopard? We are planning on doing this for both Tiger and Leopard systems.
lpadmin works also in Tiger, maybe the cups PPD’s are located somewhere else
GUI scripting for adding printers in completely different in Tiger and Leopard, because Printer Utility.app in Leopard has been discontinued
Let me say it again:
Developing an AppleScript is much of trial&error.
Without having the desired network connection or having a certain device you can’t do it because you are not able to test it.