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 into fld "list2"
end mouseUp
Here's the output on my machine:
8
| | | +-o IR recei...@4500000 <class IOUSBDevice, registered,
matched, active, busy 0, retain 8>
| | | +-o Apple Cinema disp...@24320000 <class IOUSBDevice,
registered, matched, active, busy 0, retain 8>
| | | +-o C-Media USB Audio @24330000 <class IOUSBDevice,
registered, matched, active, busy 0, retain 9>
| | | +-o Apple Cinema disp...@24720000 <class IOUSBDevice,
registered, matched, active, busy 0, retain 8>
| | | +-o ip1...@24310000 <class IOUSBDevice, registered,
matched, active, busy 0, retain 8>
| | | +-o Microsoft 3-Button Mouse with IntelliEye(TM)@6400000
<class IOUSBDevice, registered, matched, active, busy 0, retain 8>
| | | +-o Bluetooth USB Host control...@6110000 <class
IOUSBDevice, registered, matched, active, busy 0, retain 11>
| | | +-o Apple keybo...@26220000 <class IOUSBDevice,
registered, matched, active, busy 0, retain 9>
Line 5 above is the USB printer.
When I turn the printer off and run the code again, I get 7 lines and
the printer line is missing.
This printer shows up in "the availablePrinters" list as "Canon iP1700".
So there's a partial association between the 2 sets of data.
FWIW -
Phil
Phil Davis wrote:
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 tList
:-)
--
Phil Davis
PDS Labs
Professional Software Development
http://pdslabs.net
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution