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
pmb...@gmail.com > http://home.comcast.net/~pmbrig > -- View this message in context: http://n4.nabble.com/knowing-if-a-printer-is-connected-tp624188p624194.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-re

Re: knowing if a printer is connected

2009-11-19 Thread BNig
n 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 >> pmb...@gmail.com >> http://home.comcast.net/~pmbrig >> > > -

Re: knowing if a printer is connected

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

Re: knowing if a printer is connected

2009-11-19 Thread BNig
haven't used applescript much. > > -- 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-tp624188p624321.html Sent from the Revolution - User mail

Re: knowing if a printer is connected

2009-11-19 Thread Phil Davis
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. ___ use-re

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 tLi

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 & tLis

Re: knowing if a printer is connected

2009-11-19 Thread JosepM
ol the job sended to the printer. The question is capture the name of the printer or class. The name use "_" for spaces, assigning the name directly don't work, almost for me. Salut, Josep -- View this message in context: http://n4.nabble.com/knowing-if-a-printer-is-connected-tp62

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 -o page-ranges=1 -o landscape If you check the lpr command in CU

Re: knowing if a printer is connected

2009-11-20 Thread JosepM
ution 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-tp6241

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 prin

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 -- | | | +-o IR recei...@5d10 -- | | | +-o Apple In

Re: knowing if a printer is connected

2009-11-21 Thread Peter Brigham MD
sended to the printer. The question is capture the name of the printer or class. The name use "_" for spaces, assigning the name directly don't work, almost for me. Salut, Josep -- Phil Davis PDS Labs Professional Software Development http://pdslabs.net ______________

Re: knowing if a printer is connected

2009-11-21 Thread JosepM
er The getActivePrinter get all the USB devices. In my case, my 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 t

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 ac

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 print

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 Bri

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-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