Hello,
Please excuse my posting in this forum without much knowledge of scripting in itself, however I am rapidly becoming an enthusiastic amateur.
I work at a university in what we like to call the digital darkroom where we have 10 large format printers constantly turning out images that the students are working on. Every now and again one of them will get its heads clogged and i have to run back to the office jump on the server and stop that printer from accepting anymore jobs until I have cleaned it.
I recently acquired an iPod Touch (read pinched of my girlfriend!) and subsequently have set up a mini wireless network in the suite with which I use a number of web apps to control various functions on the server so I can teach and administrate at the same time! Very clever we think, (probably not THAT clever in real life…) We wrote a bunch of individual Automator actions for each printer, one that starts a printer and one that stops a printer, which I can run using Blacktree’s Telekinesis app. http://www.blacktree.com/ I have them stored in two folder, start printer and stop printers. (It runs a shell script that reads “usr/bin/enable 10_4_3_1__IP” essentially.)
What I would love however and would make my life much easier is a script that can tell if the printer is enabled or disabled and put it into the opposite state, so that i can just have one button do the job of two. I would still need 10 buttons as Telekinesis does not show you the result so I cant enter numbers or text or anything. Each of the printers IP address’s start with 10.4.3. and then has its corresponding number at the end of the ip address 1 - 10. In PSU we have renamed them Printer_1 etc for simplicity.
This script looked like it might be possible to achieve my end result, http://macscripter.net/viewtopic.php?id=18548
Especially this bit…
if printerStatus contains "is not ready" then
do shell script "/usr/bin/enable " & printerName
pStat()
end if
and if anyone has the time to talk me through it i would be very grateful
So far I have
tell application "Printer_1"
launch
do shell script "usr/bin/enable _10_4_3_1__IP_"
end tell
But i defiantly need an “If”!
The other option i guess is to use the variable states in the new Automator in 10.5.x but i don’t know if they would run under 10.4.x
We are using OS X Server 10.4.11
2 x 3 GHz Dual-Core Intel Xeon
Many thanks in advance
Greg
(In a magical world where making iPhone apps is like using iLife! I wish i could have an app that when loaded it checks in with the server and gives me a list of printers that are currently on line, then when i select one i can control its functions from the phone. I sometimes use a VNC but it is a bit clumsy and not very flashy to look at. If i can nail this and somehow access our filemaker database as well I should be able to convince them in charge to buy all of us iPhones!)
Model: OS X Server 10.4.11
AppleScript: 2.1.1
Browser: Safari 525.27.1
Operating System: Mac OS X (10.4)