Please enable JavaScript to view this site.

A-Shell Reference

Reviewed and revised December 2023

tab(-10, AG_WINPTR); chr(127);     Tab(-10,x) Syntax Notes

AG_WINPTR (56) brings up the Windows printer selection dialog.

This function has both a subroutine and a print tab implementation.

Response

A string containing four or more comma-delimited parameters depending on the circumstances and user response, i.e.:

status, ptrname$, port$, dvr$ {, orientation, length, width, form, duplex, bin, color, quality} CR

Example

Selecting the PDF-XChange Printer 2012 will return something like:

1,PDF-XChange Printer 2012,PDF-XChange5,winspool,1,0,0,Letter/ANSI A,0,0,2,300

The first parameter, status, will be 1 if the user selected a printer, else 0

See MX_WINPTR for the definitions of the remaining parameters.

Note that since ATE and A-Shell/Windows versions prior to 6.0.1248.0 will only return the first four fields, and that INPUT will continue to prompt for parameters that were not supplied. It is therefore best to input the entire string as a single line, as shown above, and then parse it out, perhaps using INSTR() or STRTOKxs Using MX_WINPTR will take care of all the parsing automatically.

See Also

History

2012 April, A-Shell 6.0.1248:  Added all parameters after "PTRDVR$"