home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / mdpool.zip / FIRST96.SCR < prev    next >
Text File  |  1995-03-18  |  2KB  |  57 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 "M";
  37.         wait until 1;                                   ! .1 second
  38.         send "O";
  39.         wait until 1;                                   ! .1 second
  40.         send "D";
  41.         wait until 1;                                   ! .1 second
  42.         send "E";
  43.         wait until 1;                                   ! .1 second
  44.         send "M";
  45.         wait until 1;                                   ! .1 second
  46.         send "^M";
  47.         goto Send_Wait;
  48.  
  49. Cancel_Connect:
  50.         exit %Cancel;
  51.  
  52. Exit_Failure:
  53.         exit %Failure;
  54.  
  55. Exit_Success:
  56.         exit %Success;
  57.