home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / mdpool.zip / FIRST24.SCR next >
Text File  |  1995-03-18  |  1KB  |  47 lines

  1. !
  2. !  FIRST:
  3. !    Provides hook (after initializing port).
  4. !    Allows for special local handling to startup comm
  5. !    May return %Cancel or %Failure.
  6. !
  7. !+V
  8. ! "3.5"
  9. !-V
  10.  
  11.         on cancel goto Cancel_Connect;
  12.         attempts = 0;
  13.  
  14. ! wait 2 seconds for DTR to stabilize then wake up the switch
  15.  
  16.         wait until 20;                                  ! 2 seconds
  17.         send "^M";
  18.  
  19. Send_Wait:
  20.         wait
  21.                 "DISCONNECTED"  goto Send_CR,
  22.                 "ENTER CLASS"   goto Send_Class,
  23.                 "GO"            goto Exit_Success
  24.         until 50;                                       ! 5 seconds
  25.         attempts = attempts + 1;
  26.         if attempts = 5 goto Exit_Failure;
  27.         goto Send_CR;
  28.  
  29. Send_CR:
  30.         wait until 2;                                   ! .2 seconds
  31.         send "^M";
  32.         goto Send_Wait;
  33.  
  34. Send_Class:
  35.         wait until 2;                                   ! .2 seconds
  36.         send "MODEM^M";
  37.         goto Send_Wait;
  38.  
  39. Cancel_Connect:
  40.         exit %Cancel;
  41.  
  42. Exit_Failure:
  43.         exit %Failure;
  44.  
  45. Exit_Success:
  46.         exit %Success;
  47.