home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 9 Archive
/
09-Archive.zip
/
wpicreat.zip
/
rxdlg11.zip
/
testrx3.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-02
|
2KB
|
85 lines
/* A test script for RX3.EXE */
/* Trap ERROR and FAILURE */
SIGNAL ON ERROR
SIGNAL ON FAILURE
/* ====================== 'Main Window' ======================= */
/* First Group is TEXT */
RXTYPE.1 = 'TEXT'
/* Default */
RXFLAGS.1 = ' '
/* Text lines */
RXLABEL.1 = "|"
/* TotalPhrases, PhrasesPerLine, WidthOfPhrase, BetweenPhrases */
RXINFO.1 = '2 1 140 0'
/* Position */
RXX.1 = 10
RXY.1 = 10
/* Default size and position (also gives us sizing and max button) */
RXWINMAIN = ' '
RXDLG 1 '"Main Window"' 'RXWINMAIN' 'RESULT'
/* Set display to DISPLAYLEVEL so that we see the auto
message display of APPSUBTRACT's error message */
RXERR 50
/* ============== Call APPADD ============ */
APPADD 5 384
/* Print result */
RXSET '""' 1 1 'VAL' 'APPADD:' Sum
/* ============== Call APPSUBTRACT ============ */
APPSUBTRACT 384 5
/* Print result */
RXSET '""' 1 2 'VAL' 'APPSUBTRACT:' Answer.0
more:
/* Do user interaction */
RXDLG
/* Did user press ESC or click on the CLOSE ICON? */
IF RXID < 0 THEN EXIT
/* Must have pressed ENTER. Do APPSUBTRACT, but this time
pass bad args. This results in a FAILURE */
APPSUBTRACT 5 384
/* Print result */
RXSET '""' 1 2 'VAL' 'APPSUBTRACT:' Answer.0
/* Do another message loop */
SIGNAL more
/* ==================================================== */
FAILURE:
/* NOTE: the variable RC contains the returned error message (not a number,
unless we use RXERR to set up Rexx Dialog to return error numbers instead).
Because we used the default severity level, Rexx Dialog has already displayed
this error message to the enduser */
EXIT
ERROR:
/* NOTE: the variable RC contains the returned error message (not a number,
unless we use RXERR to set up Rexx Dialog to return error numbers instead).
Because we used the default severity level, Rexx Dialog has already displayed
this error message to the enduser */
EXIT