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 / TimeOut.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1992-05-30  |  1001 b   |  32 lines

  1. /* An example of using the dissidents rx_intui.library TIMEOUT feature */
  2.  
  3. wind=rxi_GetWindow('Time Out',,,,640,75,,,)
  4. IF wind == '' | wind == 0 THEN SAY 'Window open error'
  5.  
  6. /* Let's ask for a TIMEOUT of 1 sec */
  7. err=rxi_SetTime(wind,10)
  8.  
  9. /* Loop until CLOSEWINDOW. Print # of timeouts. Note that every 2 seconds */
  10. /* a new timeout total appears. Also, note that if the user makes this    */
  11. /* window inactive, then the updates stop. This is because we didn't ask  */
  12. /* to receive INACTIVEWINDOW and ACTIVEWINDOW, and set and clear NO_SLEEP */
  13. /* when receiving each respectively. */
  14. class = 1
  15. time = 1
  16. DO WHILE class > 0
  17. spec=rxi_WaitMsg(wind)
  18. PARSE var spec class part1 part2 part3
  19.  
  20. /* Only do this part if a timeout event */
  21. IF class = 10 THEN DO
  22. /* When we get up to 20 timeouts, disable the feature */
  23. IF time == 20 THEN err=rxi_SetTime(wind,)
  24. /* Increment the # of timeouts and print the value */
  25. err=rxi_Text('# of timeouts = 'time,wind,5,40)
  26. time=time+1
  27. END
  28.  
  29. END
  30.  
  31. wind=rxi_EndWindow(wind)
  32.