home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
clarion
/
tools.zip
/
TOOLS.COM
/
GETPRDEV.FUN
< prev
next >
Wrap
Text File
|
1988-11-13
|
2KB
|
55 lines
!-------------------------------------------------------------------------------
! GET REPORT DEST PRINTER / DISK
!-------------------------------------------------------------------------------
GETPRDEV FUNCTION
PRTTO_MSG SCREEN WINDOW(5,26),AT(6,26),HUE(7,0,0)
ROW(4,1) PAINT(2,15),TRN
ROW(1,1) STRING('╓─{24}╖'),ENH
ROW(2,1) STRING('║<0{24}>║'),ENH
ROW(3,1) STRING('╙─{14}╖<0{9}>║'),ENH
ROW(4,16) STRING('║<0{9}>║'),ENH
ROW(5,16) STRING('╙─{9}╜'),ENH
ROW(2,3) STRING('Send output to')
ROW(1,13) MENU,USE(PR1:PSTATUS),HLP('GETPRDEV'),REQ
ROW(2,18) STRING('Printer')
ROW(3,18) STRING('Screen')
ROW(4,18) STRING('Disk')
. .
PRTFNAM_MSG SCREEN WINDOW(5,51),AT(11,16),HLP('PRTFNAME'),HUE(7,0,0)
ROW(2,2) STRING('╓─{47}╖'),ENH
ROW(3,2) STRING('║<0{47}>║'),ENH
ROW(4,2) STRING('╙─{47}╜'),ENH
ROW(3,4) STRING('Enter File Name:')
COL(20) ENTRY(@S29),USE(PR1:DISKFILE),REQ,LFT,UPR
.
PRTPR1_GRP GROUP,PRE(PR1)
PSTATUS STRING(1)
DISKFILE STRING(30)
.
CODE
ALERT !CLEAR CTRL KEYS
ALERT(F10_KEY) !ENABLE THE CTRL KEY'S
PR1:PSTATUS = 'P' !SET PRINTER
OPEN(PRTTO_MSG) !OPEN WINDOW
ACCEPT !GET REPLY
IF KEYCODE() = F10_KEY THEN RETURN(1).
IF PR1:PSTATUS = 'P' THEN !PRINTER
GBL:REPORTDEV = PRO:REPORTDEV !SET DEVICE
GBL:LABELDEV = PRO:LABELDEV !SET DEVICE
ELSIF PR1:PSTATUS = 'S' THEN !SCREEN
GBL:REPORTDEV = 'CON' !SET DEVICE
GBL:LABELDEV = 'CON' !SET DEVICE
ELSE !DISK
PR1:DISKFILE = 'REPORT.RPT' !SET DEFALUT NAME
OPEN(PRTFNAM_MSG) !OPEN WINDOW
ACCEPT !GET REPLY
IF KEYCODE() = F10_KEY THEN RETURN(1).
GBL:REPORTDEV = PR1:DISKFILE !SET FILE NAME
GBL:LABELDEV = PR1:DISKFILE !SET FILE NAME
. !END IF
RETURN(0)