Development Topics > Tab() Functions > Tab(-10,x) Functions

Display printer selection dialog

? tab(-10,AG_WINPTR); chr(127);

The function AG_WINPTR (56) brings up the "select printer" dialog. The selected printer name, along with the port and driver are returned in the keyboard buffer. For example:

? TAB(-10,AG_WINPTR);chr(127);

INPUT STATUS,PTRNAME$,PTRPORT$,PTRDVR$

 

STATUS will be 1 if the user selected a printer, else 0

PTRNAME$ will return the selected printer name (Windows descriptive name, not the A-Shell "spooler" name)

PTRPORT$ will return the selected printer port (IP address, etc.)

PTRDVR$ will return the selected printer device driver (e.g. "winspool")