Skip to content

GET_PRINTER_INFO ​

GET_PRINTER_INFO returns the name and some other information about the currently active printer.

Syntax ​

leo-grammar
CC "AdoScript" GET_PRINTER_INFO	[ no-auto-create ]

# --> RESULT ecode:intValue name:strValue
#             device:strValue port:strValue 
#			 driver:strValue valid:boolValue

Parameters ​

  • no-auto-create(modifier) - command only returns used printers, if non were used than a non-zero ecode will be be returned

Returns ​

  • ecode (intValue) - 0 if no errors or 1 if there is no printer installed
  • name (strValue) - Printer name
  • device (strValue) - Device name
  • port (strValue) - Port name
  • driver (strValue) - Driver name
  • valid (boolValue) - 0 if the printer cannot be accessed (is currently not available) or 1 if the printer can be accessed

Details ​

When no printer has been used so far (in the current session), the default printer will be accessed automatically. This can be avoided by specifying no-auto-create. With that option, a non-zero ecode will be returned when no printer has been used so far.

See Also ​

Examples ​

asc
CC "AdoScript" debug GET_PRINTER_INFO

Versions and Changes ​

Available since ADOxx 1.3