home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxswqry.zip / OS2Start.CMD < prev    next >
OS/2 REXX Batch file  |  1998-01-28  |  1KB  |  27 lines

  1. /* RxSwitchQuery (RxIsRul.DLL) Test: Wait for OS/2 App to Start *
  2.  *                                                              *
  3.  * (C) Mads Orbesen Troest & SIRIUS Cybernetics 1998            */
  4.  
  5. PARSE ARG App /* Get App on CommandLine */
  6. IF App = "" THEN EXIT /* Exit if no App Specified */
  7.  
  8. /* Load External RxSwitchQuery Routines: */
  9.  
  10. CALL RxFuncAdd "RxSwitchQueryVer", "RxIsRun", "RxSwitchQueryVer"
  11. CALL RxFuncAdd "RxSwitchQueryApp", "RxIsRun", "RxSwitchQueryApp"
  12. CALL RxFuncAdd "RxSwitchQueryWaitAppInList", "RxIsRun", "RxSwitchQueryWaitAppInList"
  13. CALL RxFuncAdd "RxSwitchQueryWaitAppNotInList", "RxIsRun", "RxSwitchQueryWaitAppNotInList"
  14.  
  15. /* Do some Initial ChitChat: */
  16.  
  17. appStr = RxSwitchQueryVer() /* Retrieve Version Information */
  18.  
  19. SAY ""
  20. SAY "RxSwitchQuery Test: Wait for OS/2 App to Start, utilising:"
  21. SAY WORD( appStr, 1) WORD( appStr, 2 ) WORD( appStr, 3 )
  22. SAY ""
  23. SAY "■ INFO  : Waiting for '"App"' to Start..."
  24. RC = RxSwitchQueryWaitAppInList( App,,'NOCASE', 5000 ) /* Only poll every 5 seconds */
  25. IF RC = "OK" THEN SAY "■ INFO  : OK!"
  26. ELSE SAY "■ PANIC : Aborted!"
  27.