home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
rexxintuition_393.lzh
/
RexxIntuition
/
Scripts
/
Input.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1990-10-28
|
782b
|
28 lines
/* Example of INPUT() */
/* Get a FileIO structure */
fileio=GetFIO()
IF fileio == '' | fileio == 0 THEN SAY 'FileIO allocation error'
/* Open a window on WB. Let it be the default IDCMP. */
wind=GetWindow('Using Input()',,,,,,,,,)
IF wind == '' | wind == 0 THEN SAY 'Window open error'
/* Get the user's input via the title bar. Allow 8 characters. Initial the */
/* input to "Jeff", and the prompt is "What is your name?" */
response=Input(wind,fileio,8,'What is your name? >','Jeff')
IF response > '' THEN DO
/* OK. The user didn't type an empty string or press ESC */
err=Text(response,wind,10,20)
END
/* Free the FileIO */
response=EndFIO(fileio)
/* Wait for ANY IDCMP */
spec=WaitMsg(wind)
/* Close the window, thus freeing any resources for it. */
err=EndWindow(wind)