home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 9 Archive
/
09-Archive.zip
/
wpicreat.zip
/
rxdlg11.zip
/
rexxset2.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-01
|
2KB
|
69 lines
/* This creates a Main Window with a Group of 1 ENTRY with the END
flag set. Whenever the user types into the ENTRY and presses ENTER,
RXDLG returns, and we force the ENTRY to contain the string "hello".
*/
/* Trap ERROR and FAILURE */
SIGNAL ON ERROR
SIGNAL ON FAILURE
/* =============== Create "Main Window" ================= */
/* First Group is ENTRY */
RXTYPE.1 = 'ENTRY'
/* Use of a control in this group causes RXDLG to return */
RXFLAGS.1 = 'END'
/* Label for control. No Groupbox */
RXLABEL.1 = 'Type Here:'
/* TotalControls, ControlsPerLine, WidthOfControls */
RXINFO.1 = '1 1 90'
/* REXX variable where initial text stored */
RXVAL.1 = 'STRS'
/* Position */
RXX.1 = 90
RXY.1 = 10
/* Text */
STRS.1 = 'some stuff'
/* Default size and position (also gives us sizing and max button) */
RXWIN1 = ''
/* NOCLOSE since we want to close the window ourselves.
No RESULT Flag, so the ESC and ENTER keys do nothing, and we don't
have to bother checking for those */
RXDLG 1 '"Main Window"' 'RXWIN1' 'NOCLOSE'
more:
/* Do user interaction */
RXDLG
/* Did user click upon the CLOSE ICON? If so, then exit */
IF RXID < 0 THEN EXIT
/* Since there is only 1 group and 1 control, we know that it caused RXDLG
to return. Force contents of ENTRY to 'hello'
*/
RXSET '""' 1 1 'VAL' 'hello'
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