home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 1 / ACE CD 1.iso / files / utils / acroarex.dms / in.adf / Public_Domain / PD_STUFF.lha / RexxIntuition / Scripts / Custom.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1992-05-30  |  1.4 KB  |  43 lines

  1. /* */
  2.  
  3. /* Get a ReqDef structure */
  4. rq = rxi_GetReq()
  5. IF rq == '' | rq == 0 THEN SAY 'ReqDef allocation error'
  6.  
  7. /* Let's set up a list for this ReqDef with a few strings. I'll use variables */
  8. /* in some of the calls to AddReq so that you can see what's acceptable.    */
  9. reqs = rxi_AddReq(rq,1,'string 1')
  10. IF reqs == 0 THEN SAY "Out of memory"
  11.  
  12. string = 'string 2'
  13. reqs = rxi_AddReq(rq,2,string)
  14. IF reqs == 0 THEN SAY "Out of memory"
  15.  
  16. thirdID = 3
  17. reqs = rxi_AddReq(rq,thirdID,'string 3')
  18. IF reqs == 0 THEN SAY "Out of memory"
  19.  
  20. /* Display that list of strings for the user to do the selection. Note STRING_MODE flag */
  21. string = rxi_ReqWindow(rq,'Select One',32768,,,'Initial String',,,0)
  22. IF string == '' THEN SAY "Canceled"
  23. SAY string
  24.  
  25. /* Display that list again. This time not that the GadgMask arg is set up to */
  26. /* remove the Name gadget. */
  27. string = rxi_ReqWindow(rq,'Select One',32768,8,,'Initial String',,,0)
  28. SAY string
  29.  
  30. /* Display that list again. This time, set ADD_ME, and also add the DELETE */
  31. /* gadget. */
  32. string = rxi_ReqWindow(rq,'Select One',32768+1,32768,,,,,0)
  33. SAY string
  34.  
  35. /* Display that list again. If on the previous call, you typed a string into */
  36. /* the Name gadget that wasn't in the list, or used the DELETE gadget, you   */
  37. /* should see the results. */
  38. string = rxi_ReqWindow(rq,'Select One',32768+1,32768,,,,,0)
  39. SAY string
  40.  
  41. /* Now free the ReqDef */
  42. rq = rxi_EndReq(rq)
  43.