home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 168.img / XTMK42-2.ZIP / TELENET.XTS < prev    next >
Text File  |  1990-03-06  |  1KB  |  89 lines

  1.  
  2. /*
  3.  
  4.     TELENET Navigation script for use by other scripts
  5.  
  6.     Copyright (c) 1986, 1989, Digital Communications Associates, Inc.
  7.     All rights reserved
  8.     For Crosstalk Mk. 4, Ver 1.1 - 01-19-89 by Sheldon T. Hall
  9.  
  10. */
  11.  
  12. assume device 'MODEM'
  13.  
  14.  
  15. proc W5R takes WTR
  16.  
  17.     integer i
  18.     string x
  19.  
  20.     wait quiet 5 ticks
  21.  
  22.     if device = "XPC" then        ...
  23.         reply WTR        : ...
  24.         exit
  25.  
  26.     for i = 1 to length(WTR)
  27.         x = mid(WTR,i,1)
  28.         if not online then exit
  29.         reply x;
  30.         wait 1 ticks for x     -- Remove if no pacing desired.
  31.     next
  32.     reply
  33.  
  34. endProc
  35.  
  36.  
  37.     ScriptDesc = "Login to Telenet with host name contained in NetID"
  38.  
  39.     sp = chr(32)
  40.  
  41.     w = freewin
  42.     window w, zone 11, color blue
  43.     title #w, ' TELENET Login '
  44.     print #w
  45.     print #w, sp; speed; ' baud: ';
  46.  
  47.     if speed => 2400 then    ...
  48.         wtr = '@'    ...
  49.     else            ...
  50.         wtr = chr(13)
  51.  
  52.     track clear
  53.     track 1, case 'E'
  54.     track 2, key 27
  55.     track routine OK
  56.     while online
  57.         print #w, '.';
  58.         reply wtr;
  59.         wait 5 ticks
  60.         reply
  61.         wait 10 ticks
  62.     wend
  63.  
  64.     end
  65.  
  66. label OK
  67.  
  68.     if track(2) then bye
  69.  
  70.     track clear
  71.  
  72.     while online
  73.  
  74.         watch for
  75.             case 'TERM'            : W5R 'D1'
  76.             '@'                : W5R 'C ' + NetID
  77.             case 'CONNECT'            : end
  78.             'illegal', 'erro',    ...
  79.             'disco', 'outage',    ...
  80.             'unavai', 'barre',    ...
  81.             'reject', 'refus',    ...
  82.             space 'not '            : W5R '' : bye
  83.             key 27                : end
  84.         endwatch
  85.  
  86.     wend
  87.  
  88.     end
  89.