knowing if a printer is connected

Peter Brigham MD pmbrig at gmail.com
Thu Nov 19 14:09:36 EST 2009


I have a stack system that is being used on laptops (at this point Mac  
OSX only). One of my beta testers uses it in three different  
locations. Among many other things, the stack prints out notes and  
various other text files from within Rev (running in IDE on RevMedia  
4.0 -- eventually I'll get to porting it as a standalone). As it  
stands now, the user needs to select the currently available printer  
using the system preferences. I need a way to discover if the printer  
designated as active in the system preferences is actually the one  
that is plugged into the USB port. I have a way for the user to change  
the printer from within the stack, but I'd like to avoid the situation  
where he tries to print something and gets the bobbing printer driver  
icon in the dock telling him that that printer is unavailable (because  
he's at a different site and forgot to change his printer designation).

The ideal solution would be to be able to detect the currently  
connected printer and send any print job automatically  to that  
printer, but I'd settle for just being able to post an alert when  
trying to print to notify him that he is about to use an unavailable  
printer. How do I detect what printer is connected? Or at least,  
detect if a designated printer is connected or not?

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig




More information about the use-livecode mailing list