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

  1.  
  2. -- genlines off
  3. -- genlabels off
  4.  
  5. /*
  6.  
  7.     TYMXPC - Single-session physical and logical session X.PC login.
  8.  
  9.     Copyright (c) 1986, 1989, Digital Communications Associates, Inc.
  10.     All rights reserved
  11.     For Crosstalk Mk. 4, Ver 1.1 - 01-19-89 by Sheldon T. Hall
  12.  
  13.     See TYMXPC.DOC for details on use of this script.
  14.  
  15. */
  16.  
  17.     assume device 'XPC'
  18.  
  19.     global string NEW_STR
  20.  
  21. proc GET_DATA takes B, integer W
  22.  
  23.     print bright; B; ':  '; normal;
  24.     form start
  25.         field NEW_STR, width W, fill 250
  26.         form accept
  27.     form end
  28.  
  29. endproc
  30.  
  31. /*
  32.     START
  33. */
  34.  
  35.     ScriptDesc = "Login to Tymnet using the X.PC protocol"
  36.  
  37.     if parent = "TYMXPC" then end
  38.  
  39.     odw = defwindow
  40.     w1 = freewin
  41.     window w1, zone 11, color 17h
  42.     defwindow = w1
  43.     title ' X.PC login '
  44.     print
  45.     print ' X.PC connection for ';
  46.     case script of
  47.         ''      : print 'terminal mode';
  48.         default : print name;
  49.     endcase
  50.  
  51.     if val(version) => 1.1 then {
  52.         if not XPCAutoLog then {
  53.             if null(answerback) then {
  54.                 print
  55.                 GET_DATA ' Your X.PC password', 20
  56.                 clear
  57.                 answerback = NEW_STR
  58.                 save
  59.             }
  60.         }
  61.     }
  62.  
  63.     wait 3 seconds for '~?'
  64.     reply 'a';
  65.  
  66.     wait 15 seconds for 'host', 'in', 'name'
  67.     if timeout then jump THE_END
  68.  
  69.     if val(version) => 1.1 then            ...
  70.         if not XPCAutoLog then            ...
  71.             reply answerback
  72.  
  73.     watch 20 seconds for
  74.         'error', key 27      : bye : Jump THE_END
  75.         chr(27) + chr(27) :
  76.     endwatch
  77.  
  78.     if exists(name + '.XTC') then script = name
  79.  
  80. --    wait 2 seconds
  81. --    packetmode ON
  82.     wait 2 seconds
  83.  
  84.     shut
  85.     defwindow = odw
  86.  
  87.     if XPCautoLog then {
  88.         trap on
  89.         z = error
  90.         GO
  91.         if error then {
  92.             BYE
  93.             wait 3 seconds
  94.             BYE
  95.         }
  96.         z = error
  97.         trap off
  98.     }
  99.  
  100. label THE_END
  101.  
  102.     defwindow = odw
  103.     script "TYMXPC"
  104.  
  105.     end
  106.  
  107.