Most of the new printers such as Epsons, and Dell, etc. they all come with a protocol that allows Mac computers to discover them on the network. But, this is not the issue. The issue is to create an applescript that will go to print and fax to mount three specific printers.
For example, when opening the print & fax application, one gets the choice to add printers. After clicking on the “+” symbol a dialogue box opens given the opportunity to choose from the default tab, fax, ip and/or windows.
At this point, by selecting default tab, one can choose the printer or printers to be mounted. The printers that I need to be mounted are shown here, as they were discover by the bonjour protocol. All I need is to automate this process everytime the users logs into twenty-five iMacs.
As you can see, this is a classroom of twenty-five computers. The students should not need to worry about mounting printers, or adding printers, but to be able to click on the print option and go.
Do you have any experiences with applescript? And could you show an example for mounting the three network printers during login process?
During the login process, from a users point of view yes!
I believe there are several ways to achieve to choose a printer, one is to simulate a user, by UI Scripting, the other would be to either edit, or overwrite a printer property list file. (Which will be transparant to the user, I am off and away from my printer until monday, so I can’t test anything, but I’ll try to come up with something for you to test within the same time tomorrow.
Just a thing I wonder about; can’t you, as an adminstrator set up a default printer for all users that log on to the machine? Or is this every user have to do by them self?
I found a script that seems to be very close to what we need in my location. The script is doing almost everything with the exception of adding the printer. Can anyone look into this code? Perhaps, among all of us can debug the code and get the benefit for using at our respective locations.
tell application “AddPrinter” to activate
tell application “System Events” to tell process “AddPrinter”
set address to “126.96.36.199” – printer ip address variable
set printername to “EPSON R3000 #1 @ PRINTSERVER” – Printer name varaible
set printerlocation to “ROOM ABC” – Printer Location
-- Set Protocol:
tell group 1 of window "Add Printer"
tell group 2
click pop up button 1
click menu item "DEFAULT" of menu 1 of pop up button 1
click combo box 2
keystroke (address) -- sets ip address from address variable
keystroke (printername) -- sets printer name
keystroke (printerlocation) -- sets location of printer
-- Add Printer
tell window "Add Printer"
click button "add"
tell sheet 1 of window "Add Printer"
tell group 1 of group 1
click button "Continue"
AFAIK. You have to walk around to each and every one of the 25 computers anyway and install the script?
I don’t know how to, and doubt that it is possible to add it via remote desktop, but then, if you have remote desktop, then you should be able to open a terminal window, and set up and execute the shell script, which configures the printer once and for all!
It is your problem, and you who decides upon the solution, I just don’t see the necessity of such a script.
The shell script solution, is a much stabler thing than the gui thing, so please try to look at it.
From what I have read so far, on other forums, some technicians are using lpadmin to add the printers to the local computer. If am not mistaking, lpadmin add the printers to the local CUPS.
Can you please provide an example for using a shell script?