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

  1. ; 日経MIX用簡単ログインスクリプト
  2.  
  3.     gethostname #HostName
  4.     if( #HostName == "" )
  5.         question "スクリプトのセットアップをしますか?"
  6.         if( yes )
  7.             goto ScriptSetup
  8.         endif
  9.     endif
  10.  
  11.  
  12.     timeout 2
  13.     wait "MIX"
  14.     if( timeout and baudrate != 0 )
  15.         send " P^M"
  16.     endif
  17.     timeout 30
  18.     loopswitch
  19.         case "WELCOME! NIKKEI^M^J"
  20.             send "C MIX^M"
  21.  
  22.         case "(enter ^"mix^"): "
  23.             send "mix^M"
  24.  
  25.         case "Name? "
  26.             if( %MixID == "" )
  27.                 input "ユーザIDを入力してください。", %MixID
  28.                 if( cancel )
  29.                     hangup
  30.                 endif
  31.             endif
  32. EnterUserID:
  33.             send %MixID + "^M"
  34.  
  35.         case "Password: "
  36. EnterPassword:
  37.             #mes = "パスワードを入力してください。"
  38.             if( %%MixPassword == "" )
  39.                 secretinput #mes, %%MixPassword
  40.                 if( cancel )
  41.                     hangup
  42.                 endif
  43.             endif
  44.             #temp = %%MixPassword
  45.             if( #temp == "毎回入力する" )
  46.                 secretinput #mes, #temp
  47.                 if( cancel )
  48.                     hangup
  49.                 endif
  50.             endif
  51.             send #temp + "^M"
  52.  
  53.         case "パスワードが違います。"
  54.             if( %%MixPassword != "毎回入力する" )
  55.                 %%MixPassword = ""
  56.             endif
  57.             %MixID = ""
  58.  
  59.         case "は登録されていません。"
  60.             %MixID = ""
  61.  
  62.         case "最終ログオン:"
  63.             breakloop
  64.     endloop
  65.     keyassign f10, "セットアップ", script, ScriptSetup
  66. WaitLogoff:
  67.     timeout 0
  68.     wait "^M^J終了時刻"
  69.     timeout 4
  70.     wait "今回の接続時間は"
  71.     if( timeout ) goto WaitLogoff
  72.     wait "^M^JMIXのご利用ありがとうございました。またのご利用をお待ちしています。^M^J"
  73.     if( timeout ) goto WaitLogoff
  74.     hangup
  75.  
  76.  
  77.  
  78. ErrorExit:
  79.     message "うまくつながってないみたいです。MIX.SCRの先頭の「timeout XXX」のXXXの部分を大きくするとうまくいくかもしれません。"
  80.     message "このあと手動運転してください。"
  81.     exit
  82.  
  83.  
  84. ScriptSetup:
  85.     menu "MIX.SCRセットアップメニュー(Escで終了)", 0, "ユーザIDの変更", "パスワードの変更"
  86.     switch result
  87.         case 0
  88.             goto ScriptSetup
  89.         case 1
  90.             input "新しいユーザIDを入力して下さい。", %MixID
  91.             if( cancel ) goto ScriptSetup
  92.             input "新しいパスワードを入力して下さい。ログイン毎に入力したい場合は何も入力せずにOKして下さい。", %%MixPassword
  93.             if( %%MixPassword == "" )
  94.                 %%MixPassword = "毎回入力する"
  95.             endif
  96.             goto ScriptSetup
  97.         case 2
  98.             input "新しいパスワードを入力して下さい。ログイン毎に入力したい場合は何も入力せずにOKして下さい。", %%MixPassword
  99.             if( %%MixPassword == "" )
  100.                 %%MixPassword = "毎回入力する"
  101.             endif
  102.             goto ScriptSetup
  103.     endswitch
  104.     exit
  105.  
  106.