Re: knowing if a printer is connected

2009-11-24 Thread Peter Brigham MD
Here is the debugged script. It turned out to be more complicated than I thought, as usual. (Murphy was a programmer, right?) Call checkPrinter before any printing commands. The first time you plug in a never-encountered printer and try to print something you will be asked to identify the

Re: knowing if a printer is connected

2009-11-23 Thread Peter Brigham MD
This worked for me on my home printer, and I had high hopes for it, but if fails this morning here at work. The problem seems to be that with some printers the listing from the ioreg call has little relation to the name of the printer. For instance, my Brother laserjet MFC 8220 (combo

Re: knowing if a printer is connected

2009-11-23 Thread Phil Davis
Hi Peter, If you filter out all lines from ioreg output except ones that contain IOUSBCompositeDevice, do you see the printer name in any line? If so, maybe available printer names could be matched to the device names in IOUSBDevice and IOUSBCompositeDevice records. Phil Peter Brigham MD

Re: knowing if a printer is connected

2009-11-23 Thread Peter Brigham MD
There is only that one entry in the ioreg output that contains IOUSBCompositeDevice and that entry disappears if I unplug that printer, so it's undoubtedly the listing for my laserjet. But there is nothing in the ioreg listing that identifies the printer more specifically, and thus there

Re: knowing if a printer is connected

2009-11-21 Thread Peter Brigham MD
___ use-revolution mailing list [hidden email] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution View message @ http://n4.nabble.com/knowing-if-a-printer-is-connected-tp624188p624409.html

Re: knowing if a printer is connected

2009-11-21 Thread JosepM
LaCie disk, the iPhone, the DataTraveler and the HP printer.. How to filter between them? Salut, Josep -- View this message in context: http://n4.nabble.com/knowing-if-a-printer-is-connected-tp624188p699883.html Sent from the Revolution - User mailing list archive at Nabble.com

Re: knowing if a printer is connected

2009-11-21 Thread Phil Davis
Everyone is doing it, so... here is what I came up with. Watch line wraps please. Hopefully the comments explain what the code is doing. on mouseUp answer UsbPrinterList() end mouseUp function UsbPrinterList -- set item delimiter set the itemDelimiter to tab -- make a list of all

Re: knowing if a printer is connected

2009-11-20 Thread JosepM
___ use-revolution mailing list [hidden email] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution View message @ http://n4.nabble.com/knowing-if-a-printer-is-connected-tp624188p624409.html

Re: knowing if a printer is connected

2009-11-20 Thread Peter Brigham MD
Yeah, I discovered that one already. Many different ways of getting the printers that are in the system preferences printing panel. But apparently no way of telling which one is actually connected and live. It's hard to believe that the system is unaware of this piece of info until a print

Re: knowing if a printer is connected

2009-11-20 Thread Peter Brigham MD
This seems to do it for me as well. I'm trying this (watch linewraps) (in a button, for testing) on mouseUp put shell(ioreg) into tList filter tList with *IOUSBDevice* -- | | | +-o DeskJet 8...@1d10 class IOUSBDevice, \ -- registered, matched, active, busy 0,

knowing if a printer is connected

2009-11-19 Thread Peter Brigham MD
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

Re: knowing if a printer is connected

2009-11-19 Thread BNig
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 pmb...@gmail.com http://home.comcast.net/~pmbrig -- View this message in context: http://n4.nabble.com/knowing-if-a-printer-is-connected

Re: knowing if a printer is connected

2009-11-19 Thread BNig
/knowing-if-a-printer-is-connected-tp624188p624225.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your

Re: knowing if a printer is connected

2009-11-19 Thread Peter Brigham MD
or not? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig -- View this message in context: http://n4.nabble.com/knowing-if-a-printer-is-connected-tp624188p624225.html Sent from the Revolution - User mailing list archive at Nabble.com

Re: knowing if a printer is connected

2009-11-19 Thread BNig
://home.comcast.net/~pmbrig -- View this message in context: http://n4.nabble.com/knowing-if-a-printer-is-connected-tp624188p624321.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com

Re: knowing if a printer is connected

2009-11-19 Thread Phil Davis
.nabble.com/knowing-if-a-printer-is-connected-tp624188p624225.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage

Re: knowing if a printer is connected

2009-11-19 Thread Phil Davis
BNig wrote: The last item of the properties of a printer is the status, it unfortunately returns idle. At least you get the names of the printers. The current printer is the default printer. regards Bernd You can also get the names of the printers with: put the availablePrinters into

Re: knowing if a printer is connected

2009-11-19 Thread Phil Davis
Here's another OS X shell command that will list only the USB printers turned on. Unfortunately, it doesn't list them by their full names. Here's the code (in a button): on mouseUp put shell(ioreg) into tList filter tList with *IOUSBDevice* put the number of lines in tList cr tList

Re: knowing if a printer is connected

2009-11-19 Thread JosepM
-if-a-printer-is-connected-tp624188p624396.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription

Re: knowing if a printer is connected

2009-11-19 Thread Phil Davis
This is the best so far! Phil Davis JosepM wrote: Hi, Also you can use from the shell: lpstat -p -- to see the available printers lpstat -d -- to know the default printer name and to send directly to the printer: lpr -P name of the printer -o page-ranges=1 -o landscape path to the file