home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / rexxintuition_463.lzh / RexxIntuition / RexxIntui.lzh / scripts / Input.rexx < prev    next >
OS/2 REXX Batch file  |  1990-06-27  |  782b  |  28 lines

  1. /* Example of INPUT() */
  2.  
  3. /* Get a FileIO structure */
  4. fileio=GetFIO()
  5. IF fileio == '' | fileio == 0 THEN SAY 'FileIO allocation error'
  6.  
  7. /* Open a window on WB. Let it be the default IDCMP. */
  8. wind=GetWindow('Using Input()',,,,,,,,,)
  9. IF wind == '' | wind == 0 THEN SAY 'Window open error'
  10.  
  11. /* Get the user's input via the title bar. Allow 8 characters. Initial the */
  12. /* input to "Jeff", and the prompt is "What is your name?" */
  13. response=Input(wind,fileio,8,'What is your name? >','Jeff')
  14.  
  15. IF response > '' THEN DO
  16. /* OK. The user didn't type an empty string or press ESC */
  17. err=Text(response,wind,10,20)
  18. END
  19.  
  20. /* Free the FileIO */
  21. response=EndFIO(fileio)
  22.  
  23. /* Wait for ANY IDCMP */
  24. spec=WaitMsg(wind)
  25.  
  26. /* Close the window, thus freeing any resources for it. */
  27. err=EndWindow(wind)
  28.