shell command to identify wireless printer

Mike Bonner bonnmike at gmail.com
Sat Oct 9 00:24:23 EDT 2010


Can you come at it from a different direction?  Can you check current SSID
against a printer list to select which printer you want? Assuming you always
go to the same set of networks, this should have a similar affect yes?  Set
it up once, save the printer name, next time you need to print check the
current ssid and select the appropriate printer name.

YOu can get the current ssid with the following command line.

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
-I

MOre info than you need, but easy to parse.

On Fri, Oct 8, 2010 at 9:51 PM, Peter Brigham MD <pmbrig at gmail.com> wrote:

> 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 <http://home.comcast.net/%7Epmbrig>
>
>
>
> 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
>>
>
> _______________________________________________
> 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