Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 13 MAY 2002 06:40:36PM Jeff Morra wrote:

Can anyone tell me how to get which LPT port or printer someone choose from a "SETPRINTER" command? I need to output which port was picked in a variable, and I can't find the enviroment variable for that. We are using AREV 3.12.


At 13 MAY 2002 10:17PM Richard Hunt wrote:

Jeff,

I don't know of an easy way to do it. The only way I know how to do it is to create your own popup. Then get the result of the popup. Then pass the selected result to the "SETPRINTER" command.

Kinda like this…

DECLARE FUNCTION POP.UP

OPEN 'SYSPOPUPS' TO FILE_DATA ELSE

MESSAGE=Unable to open the "SYSPOPUPS" file.'

CALL MSG(MESSAGE)

STOP

END

ID=ACTIVE_PRINTER_POPUP'

READ RECORD FROM FILE_DATA, ID ELSE

MESSAGE=Unable to read record ':QUOTE(ID):' from the "SYSPOPUPS" file.'

CALL MSG(MESSAGE)

STOP

END

COL=RECORD

ROW=RECORD

FILE=RECORD

DISPLAY=RECORD

FORMAT=RECORD

MODE=RECORD

SELECT=RECORD

TITLE=RECORD

ATTRIBUTES=RECORD

HELP=RECORD

COORDINATES=RECORD

TYPE=RECORD

DESCS=@ENVIRON.SET

PORTS=@ENVIRON.SET

DISPLAY='

LAST_FIELD=COUNT(DESCS,@VM) + (DESCS NE '')

FOR FIELD=1 TO LAST_FIELD

DISPLAY=DESCS:@VM:PORTS

NEXT FIELD

RESULT=POP.UP(COL,ROW,FILE,DISPLAY,FORMAT,MODE,SELECT,TITLE,ATTRIBUTES,HELP,COORDINATES,TYPE)

IF RESULT GT 0 AND LE LAST_FIELD THEN

SENTENCE=SETPRINTER ':RESULT

PERFORM SENTENCE

END

END


At 14 MAY 2002 03:07AM Larry Wilson wrote:

If you want real-time information on the printers, insert the GEC labelled common.

common /gec_common/ gec1, gec2, gec3

EQU ColorSequences TO GEC1

EQU PrinterNumber$ TO GEC31,1

EQU PrinterNames$ TO @environ.set

EQU PrinterName$ TO @environ.set

EQU PrinterPorts$ TO @environ.set

EQU PrinterPort$ TO @environ.set

EQU UserEnvironment$ TO @environ.set

EQU PrinterQueues$ TO @environ.set

EQU PrinterQueue$ TO @environ.set

EQU OPENCODE$ TO GEC2

EQU OPENCMD$ TO GEC2

EQU CLOSECODE$ TO GEC2

EQU CLOSECMD$ TO GEC2

EQU FormFeed$ TO GEC2

I hope that helps.

Larry Wilson

larry@AdvancedRevelation.com

http://AdvancedRevelation.com

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/edcf1c9c174931c688256bb8007c9136.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1