home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 5 / CD_Magazyn_EXEC_nr_5.iso / Gry / ToTDemo.lha / talesdemo1 / rexx / GenesisOnline.rexx < prev    next >
OS/2 REXX Batch file  |  2000-02-18  |  4KB  |  89 lines

  1. /******************************************************************************************************/
  2. /* Online-Script für Genesis mit Arexx                                                                */
  3. /*     © by Martin Wolf / Eternity Hard & Software                                                  */
  4. /*                                                                                      */
  5. /*                                                                                                    */
  6. /*      First Bit set: 22.10.1998                                                                     */
  7. /*      Last Bit set : 19.02.2000                                                                     */
  8. /******************************************************************************************************/
  9.  
  10.  
  11. /* ACHTUNG Wichtig ! Bis zur Genesis-Version 1.06 ist der Arexx-Port extrem buggy. Deshalb            */
  12. /*                   dieses Script nur mit einem Interface names PPP (also Modem-Config)              */
  13.  
  14.  
  15. InterfaceName ='PPP'  /* Setze hier deinen Interface-Namen */
  16.  
  17.  
  18. OPTIONS RESULTS
  19. OPTIONS FAILAT 31
  20. SIGNAL ON ERROR
  21.  
  22. ADDRESS COMMAND
  23.     'SetEnv ToTDemo1:Data/TOT_ONLINE 0'            /* Genesis-EnvVar resetten              */
  24.     counter_MW=0
  25.     DO UNTIL SHOW('P','GENESIS')                /* Auf Genesis warten                   */
  26.       SIGNAL OFF ERROR
  27.       'WaitForPort GENESIS'
  28.       SIGNAL ON ERROR
  29.       IF counter_MW=3 THEN EXIT    
  30.       counter_MW=counter_MW+1
  31.     END
  32.      IF SHOW('P','GENESIS') THEN
  33.     DO
  34.       'SetEnv ToTDemo1:Data/TOT_ONLINE 1'            /* Genesis-Port wurde gefunden          */
  35.       genesisport = GENESIS                    /* ist auf jeden Fall der aktive Port   */
  36.     END
  37.     IF ~SHOW('P','GENESIS') THEN
  38.     DO
  39.       'SetEnv ToTDemo1:Data/TOT_ONLINE -1'            /* Konnte Genesis nicht finden          */
  40.       EXIT
  41.     END        
  42.  
  43. ADDRESS (genesisport)
  44.     SIGNAL OFF ERROR
  45.     STATUS
  46.     SIGNAL ON ERROR
  47.     status_MW=rc
  48.  
  49.     IF (status_MW=0) THEN
  50.     DO
  51.       SIGNAL OFF ERROR
  52.       CONNECT InterfaceName
  53.       DO FOREVER                         /*warten für den LogIN*/
  54.       STATUS
  55.       status_MW=rc
  56.       IF status_MW=1 THEN LEAVE
  57.       IF status_MW=-1 THEN LEAVE
  58.           END
  59.       STATUS
  60.       status_MW=rc
  61.       SIGNAL ON ERROR
  62.  
  63. ADDRESS COMMAND
  64.       IF (rc=0) THEN 'SetEnv ToTDemo1:Data/TOT_ONLINE -3'    /* Fehler beim LogIn              */
  65.         ELSE 'SetEnv ToTDemo1:Data/TOT_ONLINE 2'
  66.     END
  67.     ELSE ADDRESS COMMAND 'SetEnv ToTDemo1:Data/TOT_ONLINE 3'/* Genesis war schon Online !          */
  68.  
  69.     EXIT
  70.  
  71. ERROR:
  72. ADDRESS COMMAND
  73.     'SetEnv ToTDemo1:Data/TOT_ONLINE -1'            /* Message : Found Miami              */
  74.     EXIT    
  75.  
  76. /******************************************************************************************************/
  77. /* Erklärung zu den Env-Variablen                                                                     */
  78. /*     TOT_ONLINE                                                                     */
  79. /*                                                                                      */
  80. /*    -3=Fehler beim Genesis-Login                                              */
  81. /*    -2=Konnte Genesis-Port nicht finden                                      */
  82. /*    -1=Fehler im Script                                                      */
  83. /*       0=Genesis-Port wurde nicht gefunden                                                          */
  84. /*       1=Genesis-Port gefunden und Script versucht online zu gehen                                  */
  85. /*     2=Genesis ist online                                                                           */
  86. /*     3=Genesis war schon online !                                                                  */
  87. /*                                                                                                    */
  88. /******************************************************************************************************/
  89.