detecting currently connected printer - Mac

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

detecting currently connected printer - Mac

pmbrig
Anyone know how to get a listing of the currently connected printer on a Mac? I used to do this on my (very) old MacBook via a shell call:
put shell("ioreg") into tList
and then parse the list to find the connected printer name.

And I now have a new MacBook Pro, and I can’t find anything resembling a printer in the IO registry list.

Any ideas?

— Peter

Peter M. Brigham
[hidden email] <mailto:[hidden email]>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: detecting currently connected printer - Mac

Mike Bonner
does-- lpstat -p give the info you need? (from shell)

On Fri, Sep 16, 2016 at 11:52 AM, Peter M. Brigham <[hidden email]> wrote:

> Anyone know how to get a listing of the currently connected printer on a
> Mac? I used to do this on my (very) old MacBook via a shell call:
> put shell("ioreg") into tList
> and then parse the list to find the connected printer name.
>
> And I now have a new MacBook Pro, and I can’t find anything resembling a
> printer in the IO registry list.
>
> Any ideas?
>
> — Peter
>
> Peter M. Brigham
> [hidden email] <mailto:[hidden email]>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: detecting currently connected printer - Mac

Colin Holgate-3
Was curious what that does. For me it returns a list of all the printers my Mac has seen in the last few years, and currently I have no active printers on my network at home.


> On Sep 16, 2016, at 2:02 PM, Mike Bonner <[hidden email]> wrote:
>
> does-- lpstat -p give the info you need? (from shell)
>
> On Fri, Sep 16, 2016 at 11:52 AM, Peter M. Brigham <[hidden email]> wrote:
>
>> Anyone know how to get a listing of the currently connected printer on a
>> Mac? I used to do this on my (very) old MacBook via a shell call:
>> put shell("ioreg") into tList
>> and then parse the list to find the connected printer name.
>>
>> And I now have a new MacBook Pro, and I can’t find anything resembling a
>> printer in the IO registry list.
>>
>> Any ideas?
>>
>> — Peter
>>
>> Peter M. Brigham
>> [hidden email] <mailto:[hidden email]>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: detecting currently connected printer - Mac

Mike Bonner
Interesting.  If it returns zombie printers, its not exactly helpful.

On Fri, Sep 16, 2016 at 12:07 PM, Colin Holgate <[hidden email]>
wrote:

> Was curious what that does. For me it returns a list of all the printers
> my Mac has seen in the last few years, and currently I have no active
> printers on my network at home.
>
>
> > On Sep 16, 2016, at 2:02 PM, Mike Bonner <[hidden email]> wrote:
> >
> > does-- lpstat -p give the info you need? (from shell)
> >
> > On Fri, Sep 16, 2016 at 11:52 AM, Peter M. Brigham <[hidden email]>
> wrote:
> >
> >> Anyone know how to get a listing of the currently connected printer on a
> >> Mac? I used to do this on my (very) old MacBook via a shell call:
> >> put shell("ioreg") into tList
> >> and then parse the list to find the connected printer name.
> >>
> >> And I now have a new MacBook Pro, and I can’t find anything resembling a
> >> printer in the IO registry list.
> >>
> >> Any ideas?
> >>
> >> — Peter
> >>
> >> Peter M. Brigham
> >> [hidden email] <mailto:[hidden email]>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: detecting currently connected printer - Mac

pmbrig
> On Sep 16, 2016, at 2:09 PM, Mike Bonner <[hidden email]> wrote:
>
> Interesting.  If it returns zombie printers, its not exactly helpful.

Right. I need a way of detecting which printer is currently connected via USB. Any other ideas?

> On Fri, Sep 16, 2016 at 12:07 PM, Colin Holgate <[hidden email]>
> wrote:
>
>> Was curious what that does. For me it returns a list of all the printers
>> my Mac has seen in the last few years, and currently I have no active
>> printers on my network at home.
>>
>>
>>> On Sep 16, 2016, at 2:02 PM, Mike Bonner <[hidden email]> wrote:
>>>
>>> does-- lpstat -p give the info you need? (from shell)
>>>
>>> On Fri, Sep 16, 2016 at 11:52 AM, Peter M. Brigham <[hidden email]>
>> wrote:
>>>
>>>> Anyone know how to get a listing of the currently connected printer on a
>>>> Mac? I used to do this on my (very) old MacBook via a shell call:
>>>> put shell("ioreg") into tList
>>>> and then parse the list to find the connected printer name.
>>>>
>>>> And I now have a new MacBook Pro, and I can’t find anything resembling a
>>>> printer in the IO registry list.
>>>>
>>>> Any ideas?

— Peter

Peter M. Brigham
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: detecting currently connected printer - Mac

Colin Holgate-3
I found this, which lets you see all devices connected to USB:

ioreg -p IOUSB -w0 | sed 's/[^o]*o //; s/@.*$//' | grep -v '^Root.*'



> On Sep 16, 2016, at 2:16 PM, Peter M. Brigham <[hidden email]> wrote:
>
>> On Sep 16, 2016, at 2:09 PM, Mike Bonner <[hidden email]> wrote:
>>
>> Interesting.  If it returns zombie printers, its not exactly helpful.
>
> Right. I need a way of detecting which printer is currently connected via USB. Any other ideas?
>
>> On Fri, Sep 16, 2016 at 12:07 PM, Colin Holgate <[hidden email]>
>> wrote:
>>
>>> Was curious what that does. For me it returns a list of all the printers
>>> my Mac has seen in the last few years, and currently I have no active
>>> printers on my network at home.
>>>
>>>
>>>> On Sep 16, 2016, at 2:02 PM, Mike Bonner <[hidden email]> wrote:
>>>>
>>>> does-- lpstat -p give the info you need? (from shell)
>>>>
>>>> On Fri, Sep 16, 2016 at 11:52 AM, Peter M. Brigham <[hidden email]>
>>> wrote:
>>>>
>>>>> Anyone know how to get a listing of the currently connected printer on a
>>>>> Mac? I used to do this on my (very) old MacBook via a shell call:
>>>>> put shell("ioreg") into tList
>>>>> and then parse the list to find the connected printer name.
>>>>>
>>>>> And I now have a new MacBook Pro, and I can’t find anything resembling a
>>>>> printer in the IO registry list.
>>>>>
>>>>> Any ideas?
>
> — Peter
>
> Peter M. Brigham
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: detecting currently connected printer - Mac

pmbrig
Fantastic! That does it. Many thanks.

— Peter

Peter M. Brigham
[hidden email]

> On Sep 16, 2016, at 2:22 PM, Colin Holgate <[hidden email]> wrote:
>
> I found this, which lets you see all devices connected to USB:
>
> ioreg -p IOUSB -w0 | sed 's/[^o]*o //; s/@.*$//' | grep -v '^Root.*'
>
>
>
>> On Sep 16, 2016, at 2:16 PM, Peter M. Brigham <[hidden email]> wrote:
>>
>>> On Sep 16, 2016, at 2:09 PM, Mike Bonner <[hidden email]> wrote:
>>>
>>> Interesting.  If it returns zombie printers, its not exactly helpful.
>>
>> Right. I need a way of detecting which printer is currently connected via USB. Any other ideas?


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode