home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / OLS / Winnt / HTNT306 / HTNT306.LZH / ASCIINET.SCR next >
Text File  |  1996-02-09  |  3KB  |  110 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.     #key = "Software\Hidemaruo\ASCIInetScript\" + #HostName
  19.     openreg "CURRENTUSER", #key
  20.     if( yes )
  21.         getreg "channel", ##count
  22.         closereg
  23.     endif
  24.  
  25.     timeout 3
  26.     loopswitch
  27.         case "login User ID: "
  28.             breakloop
  29.  
  30.         case "*"
  31.             send "c ascii^M"
  32.  
  33.         case timeout
  34.             if( ##count == 0 )
  35.                 send "@"
  36.                 sleep 1
  37.                 send "^M"
  38.                 ##count = 1
  39.             elseif( ##count == 1 )
  40.                 send "ASCII^M"
  41.                 ##count = 2
  42.             elseif( ##count == 2 )
  43.                 send "^M"
  44.                 sleep 1
  45.                 send "^M"
  46.                 ##count = 3
  47.             else
  48.                 message "接続に失敗しました。手動に切り替えます。"
  49.                 exit
  50.             endif
  51.     endloop
  52.  
  53.     if( ##count != 0 )
  54.         createreg "CURRENTUSER", #key
  55.         writeregint "channel", ##count - 1
  56.         closereg
  57.     endif
  58.  
  59.     timeout 0
  60.     if( %AsciiNetID == "" )
  61.         input "ユーザIDを入力してください。", %AsciiNetID
  62.         if( cancel ) hangup
  63.     endif
  64.     send %AsciiNetID + "^M"
  65.     wait "User Password:"
  66.     #mes = "パスワードを入力してください。"
  67. EnterPassword:
  68.     if( %%AsciiNetPassword == "" )
  69.         secretinput #mes, %%AsciiNetPassword
  70.         if( cancel )
  71.             hangup
  72.         endif
  73.     endif
  74.     #temp = %%AsciiNetPassword
  75.     if( #temp == "毎回入力する" )
  76.         secretinput #mes, #temp
  77.         if( cancel )
  78.             hangup
  79.         endif
  80.     endif
  81.     send #temp + "^M"
  82.     keyassign f10, "セットアップ", script, ScriptSetup
  83.     exit
  84.  
  85.  
  86.  
  87. ScriptSetup:
  88.     menu "ASCIINET.SCRセットアップメニュー(Escで終了)", 0, "ユーザIDの変更", "パスワードの変更"
  89.     switch result
  90.         case 0
  91.             goto ScriptSetup
  92.         case 1
  93.             input "新しいユーザIDを入力して下さい。", %AsciiNetID
  94.             if( cancel ) goto ScriptSetup
  95.             input "新しいパスワードを入力して下さい。ログイン毎に入力したい場合は何も入力せずにOKして下さい。", %%AsciiNetPassword
  96.             if( %%AsciiNetPassword == "" )
  97.                 %%AsciiNetPassword = "毎回入力する"
  98.             endif
  99.             goto ScriptSetup
  100.         case 2
  101.             input "新しいパスワードを入力して下さい。ログイン毎に入力したい場合は何も入力せずにOKして下さい。", %%AsciiNetPassword
  102.             if( %%AsciiNetPassword == "" )
  103.                 %%AsciiNetPassword = "毎回入力する"
  104.             endif
  105.             goto ScriptSetup
  106.     endswitch
  107.     exit
  108.  
  109.  
  110.