SuperCard Shell Essentials

 

printerReady

Page history last edited by DCS 3 yrs ago

PrinterReady function

 

function printerReady
put "lpq | sed 1q | " into cmd
put "perl -pe 's/.*not readyn/false/' | " after cmd
put "perl -pe 's/.*readyn/true/'" after cmd
return shell(cmd)
end printerReady

 

Usage:

get printerReady()

put printerReady() into variable

if printerReady() then do stuff

 

Notes:

If there was an error will most likely return empty.

Comments (0)

You don't have permission to comment on this page.