knowing if a printer is connected
JosepM
jmyepes at mac.com
Sat Nov 21 16:53:02 EST 2009
Hi,
In English work, but in Spanish and others languages don't.
The result of the shell command is:
destino por omision del sistema: HP_Photosmart_C4200_series
So we must check for the ":" and get the printer name.
set itemdel to ":"
put item 2 of shell("lpstat -d") into tDefaultPrinter
function getDefaultPrinter
put word 4 of shell("lpstat -d") into tDefaultPrinter
-- shell returns: system default destination: HP_DESKJET_845C
replace "_" with space in tDefaultPrinter
return tDefaultPrinter
end getDefaultPrinter
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 the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list