shell command to identify wireless printer

Peter Brigham MD pmbrig at gmail.com
Fri Oct 8 23:51:42 EDT 2010


The printername gives the name of the printer currently selected in  
the print dialog, ie, the default printer. On my MacBook, this will be  
the last printer used. But that will not necessarily be the name of  
the currently connected printer, if I have changed venues. I'm trying  
to find a way to discover the name of the printer that is currently  
connected to the Mac. I can do this with a rather complex handler I  
cobbled together if the the printer is plugged in via USB, but I'm  
struggling to find a way of getting the name of a printer that is  
currently connected wirelessly over an Airport router. It turns out  
that neither lpstat nor lpq seem to do this.

Any further ideas? Anyone?

-- Peter

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



On Oct 8, 2010, at 5:00 PM, J. Landman Gay wrote:

> On 10/8/10 12:30 PM, Peter Brigham MD wrote:
>> The availablePrinters shows the list of printers you have named and  
>> have
>> drivers for -- it's what appears in the print dialog list, from which
>> you choose the printer you want to use. I want to know automatically
>> which printer my laptop is connected to at the moment so I can bypass
>> the print dialog entirely and send all printing to that printer.
>
> Isn't that "the printername"?
>
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the Use-livecode mailing list