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

  1. ; CompuServe用 簡単ログインスクリプト
  2. ; FENICS経由での接続はもちろん、全世界のCompuServeアクセスポイントへの
  3. ; 接続がこのスクリプト1本でできます。
  4.  
  5.  
  6.     gethostname #HostName
  7.     if( #HostName == "" )
  8.         question "スクリプトのセットアップをしますか?"
  9.         if( yes )
  10.             goto ScriptSetup
  11.         endif
  12.     endif
  13.  
  14.     timeout 4                      ;     うまくログインしない場合はここを大きくする
  15.     switch
  16.         case "HOST NAME?"
  17.             wait "*"
  18.             send "C CIS^M"
  19.  
  20.         case "User ID: "
  21.             goto EnterUserID
  22.  
  23.         case "Host Name:  "
  24.             send "CIS^M"
  25.  
  26.         case timeout
  27.             timeout 1
  28.             send " P^M"
  29.     endswitch
  30.  
  31.     timeout 50
  32. RetryHostName:
  33.     switch
  34.         case "Host Name:  "
  35.             send "CIS^M"
  36.             goto RetryHostName
  37.         case "^M^J*"
  38.             beginloop
  39.                 send "C CIS^M"
  40.                 switch
  41.                     case "User ID: "
  42.                         goto EnterUserID
  43.                     case "^M^J*"
  44.                         question "センターが接続要求を拒否しました。再試行しますか?"
  45.                         if( no ) hangup
  46.                     case timeout
  47.                         goto エラー
  48.                 endswitch
  49.             endloop
  50.         case "User ID: "
  51.             ; 続く
  52.         case timeout
  53.             goto エラー
  54.     endswitch
  55.  
  56. EnterUserID:
  57.     if( %CisID == "" )
  58.         input "ユーザIDを入力してください。", %CisID
  59.         if( cancel )
  60.             hangup
  61.         endif
  62.     endif
  63.     send %CisID + "^M"
  64.     wait "Password: "
  65.     if( timeout ) goto エラー
  66. EnterPassword:
  67.     #mes = "パスワードを入力してください。"
  68.     if( %%CisPassword == "" )
  69.         secretinput #mes, %%CisPassword
  70.         if( cancel )
  71.             hangup
  72.         endif
  73.     endif
  74.     #temp = %%CisPassword
  75.     if( #temp == "毎回入力する" )
  76.         secretinput #mes, #temp
  77.         if( cancel )
  78.             hangup
  79.         endif
  80.     endif
  81.     send #temp + "^M"
  82.     wait "CompuServe"
  83.     if( timeout ) goto エラー
  84.  
  85. WaitLogoff:
  86.     timeout 0
  87.     wait "^M^JThank you for using CompuServe!^M^J"
  88.     timeout 4
  89.     wait "Off at "
  90.     if( timeout ) goto WaitLogoff
  91.     switch
  92.         case "HOST NAME?"
  93.             ;
  94.         case "Host Name:  "
  95.             hangup
  96.         case timeout
  97.             goto WaitLogoff
  98.     endswitch
  99.     wait postidle(1) "*"
  100.     if( timeout ) goto WaitLogoff
  101.     hangup
  102.  
  103. エラー:
  104.     message "接続に失敗しました。手動に切り替えます。"
  105.     exit
  106.  
  107.  
  108.  
  109. ScriptSetup:
  110.     menu "Cis.SCRセットアップメニュー(Escで終了)", 0, "ユーザIDの変更", "パスワードの変更"
  111.     switch result
  112.         case 0
  113.             goto ScriptSetup
  114.         case 1
  115.             input "新しいユーザIDを入力して下さい。", %CisID
  116.             if( cancel ) goto ScriptSetup
  117.             input "新しいパスワードを入力して下さい。ログイン毎に入力したい場合は何も入力せずにOKして下さい。", %%CisPassword
  118.             if( %%CisPassword == "" )
  119.                 %%CisPassword = "毎回入力する"
  120.             endif
  121.             goto ScriptSetup
  122.         case 2
  123.             input "新しいパスワードを入力して下さい。ログイン毎に入力したい場合は何も入力せずにOKして下さい。", %%CisPassword
  124.             if( %%CisPassword == "" )
  125.                 %%CisPassword = "毎回入力する"
  126.             endif
  127.             goto ScriptSetup
  128.     endswitch
  129.     exit
  130.  
  131.