home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / OLS / Win95 / HT315 / HT315.LZH / ASCIINET.SCR < prev    next >
Text File  |  1996-03-28  |  3KB  |  114 lines

  1. ; ASCIInet channel A,B,C,telnet共通ログインスクリプト
  2. ; 東京直通回線のほか、全国のASCIINETアクセスポイント、telnet接続、全部
  3. ; このスクリプトだけでログインできます。
  4. ;
  5. ; 300BPS/1200BPSのアクセスポイントに接続する場合は16行目の
  6. ; ##count = 0 を、##count = 1に変更した方が早くログインできます。
  7.  
  8.     gethostname #HostName
  9.     if( #HostName == "" )
  10.         question "スクリプトのセットアップをしますか?"
  11.         if( yes )
  12.             goto ScriptSetup
  13.         endif
  14.     endif
  15.  
  16.     ##count = 0
  17.  
  18.     if( baudrate == 0 )
  19.         timeout 30
  20.     else
  21.         timeout 3
  22.     endif
  23.     #key = "Software\Hidemaruo\ASCIInetScript\" + #HostName
  24.     openreg "CURRENTUSER", #key
  25.     if( yes )
  26.         getreg "channel", ##count
  27.         closereg
  28.     endif
  29.  
  30.     loopswitch
  31.         case "login User ID: "
  32.             breakloop
  33.  
  34.         case "*"
  35.             send "c ascii^M"
  36.  
  37.         case timeout
  38.             if( ##count == 0 )
  39.                 send "@"
  40.                 sleep 1
  41.                 send "^M"
  42.                 ##count = 1
  43.             elseif( ##count == 1 )
  44.                 send "ASCII^M"
  45.                 ##count = 2
  46.             elseif( ##count == 2 )
  47.                 send "^M"
  48.                 sleep 1
  49.                 send "^M"
  50.                 ##count = 3
  51.             else
  52.                 message "接続に失敗しました。手動に切り替えます。"
  53.                 exit
  54.             endif
  55.     endloop
  56.  
  57.     if( ##count != 0 )
  58.         createreg "CURRENTUSER", #key
  59.         writeregint "channel", ##count - 1
  60.         closereg
  61.     endif
  62.  
  63.     timeout 0
  64.     if( %AsciiNetID == "" )
  65.         input "ユーザIDを入力してください。", %AsciiNetID
  66.         if( cancel ) hangup
  67.     endif
  68.     send %AsciiNetID + "^M"
  69.     wait "User Password:"
  70.     #mes = "パスワードを入力してください。"
  71. EnterPassword:
  72.     if( %%AsciiNetPassword == "" )
  73.         secretinput #mes, %%AsciiNetPassword
  74.         if( cancel )
  75.             hangup
  76.         endif
  77.     endif
  78.     #temp = %%AsciiNetPassword
  79.     if( #temp == "毎回入力する" )
  80.         secretinput #mes, #temp
  81.         if( cancel )
  82.             hangup
  83.         endif
  84.     endif
  85.     send #temp + "^M"
  86.     keyassign f10, "セットアップ", script, ScriptSetup
  87.     exit
  88.  
  89.  
  90.  
  91. ScriptSetup:
  92.     menu "ASCIINET.SCRセットアップメニュー(Escで終了)", 0, "ユーザIDの変更", "パスワードの変更"
  93.     switch result
  94.         case 0
  95.             goto ScriptSetup
  96.         case 1
  97.             input "新しいユーザIDを入力して下さい。", %AsciiNetID
  98.             if( cancel ) goto ScriptSetup
  99.             input "新しいパスワードを入力して下さい。ログイン毎に入力したい場合は何も入力せずにOKして下さい。", %%AsciiNetPassword
  100.             if( %%AsciiNetPassword == "" )
  101.                 %%AsciiNetPassword = "毎回入力する"
  102.             endif
  103.             goto ScriptSetup
  104.         case 2
  105.             input "新しいパスワードを入力して下さい。ログイン毎に入力したい場合は何も入力せずにOKして下さい。", %%AsciiNetPassword
  106.             if( %%AsciiNetPassword == "" )
  107.                 %%AsciiNetPassword = "毎回入力する"
  108.             endif
  109.             goto ScriptSetup
  110.     endswitch
  111.     exit
  112.  
  113.  
  114.