home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / FWINDOWS / Padnv335 / PADNV335.LZH / INET_CIS.SCR < prev    next >
Text File  |  1996-10-26  |  3KB  |  131 lines

  1. ; TelnetからCompuServeへアクセスする為のスクリプト Version 3.33
  2. ;                                      Coded by Piyo / PFF01507
  3.  
  4.     title "CompuServeへアクセス中"
  5.     send #1+"^M"
  6.     wait "Host Name: "
  7.     send "CISAGREE^M"
  8. ;    wait "Enter choice (300, 2400, 9600, 14400, OFF): "
  9. ;    send "14400^M"
  10.  
  11.     timeout 20
  12.     ##count = 0
  13.     loopswitch
  14.         case "User ID:"
  15.             breakloop
  16.         case "^M^J暫く時間をおいて再度アクセスしてください。"
  17.             wait "^M^J>"
  18.             ##count = ##count+1
  19.             if( ##count > 20 )
  20.                 timeoutmessage "只今、Telnetは混雑していますのでアクセスを中止します", 3
  21.                 return
  22.             endif
  23.             send "2^M"
  24.         case "^M^J>"
  25.             send "2^M"
  26.         case "^M^JTELNET> "
  27.             send #1
  28.             wait "Host Name: "
  29.             send "CISAGREE^M"
  30. ;            wait "Enter choice (300, 2400, 9600, 14400, OFF): "
  31. ;            send "14400^M"
  32.     endloop
  33.     if( timeout ) goto エラー
  34.     #idset = %CisID
  35.     if( #idset == "" )
  36. RetryID:
  37.         input "IDを入力して下さい", #idset
  38.         if( cancel ) goto HangUp
  39.         %CisID = #idset
  40.     endif
  41. EnterUserID:
  42.     send #idset + "^M"
  43.     loopswitch
  44.         case "Password: "
  45.             breakloop
  46.         case "?? LOGINE - Invalid entry - try again"
  47.             timeoutmessage "ID番号が間違っています", 3
  48.             goto RetryID
  49.         case timeout
  50.             goto エラー
  51.     endloop
  52. EnterPassword:
  53.     ##count = 0
  54.     #passset = %%CisPassword
  55.     if( #passset == "" )
  56.         secretinput "パスワードを入力して下さい", #passset
  57.         if( cancel ) goto HangUp
  58.         %%CisPassword = #passset
  59.         ##count = ##count+1
  60.     endif
  61.     send #passset + "^M"
  62.     loopswitch
  63.         case "CompuServe Information Service"
  64.             title "CompuServeへ接続しました"
  65.             breakloop
  66.         case "?? LOGINE - Invalid entry - try again"
  67.             timeoutmessage "パスワードが間違っています", 2
  68.             if( ##count > 2 ) goto HangUp
  69.             secretinput "パスワードを入力して下さい", %%CisPassword
  70.             if( cancel ) goto HangUp
  71.             send %%CisPassword + "^M"
  72.             ##count = ##count+1
  73. ;        case "^M^J只今の時間、"
  74. ;            title "定期保守中"
  75. ;            goto Hoshu
  76.         case timeout
  77.             goto エラー
  78.     endloop
  79.  
  80.     wait "All Rights Reserved"            ; NIF接続を再確認
  81.     keyboard on
  82.     getdate #date
  83.     #log = "NIF"+part( #date, 2, 4 )+".LOG"
  84.     log #log
  85.     #mail = "FALSE"
  86.     loopswitch
  87.         case "You have Electronic Mail waiting."
  88.             title "メールが来ています"
  89.             #mail = "TRUE"
  90.         case "<CR> for more!"
  91.             send "^M"
  92.         case "^M^JLast page, enter choice!"
  93.             breakloop
  94.         case "^M^JEnter choice!"
  95.             breakloop
  96.         case postmilliidle(500) "!"
  97.             breakloop
  98.     endloop
  99.  
  100.     if( #mail == "TRUE" )
  101.         log
  102.         log "mail"
  103.         send "GO MAIL^M"
  104.         wait "Enter choice!"
  105.         send "1^M"
  106.         wait "to continue !"
  107.         log
  108.         log #log
  109.     endif
  110.  
  111.     wait "^M^JConnection closed by foreign host."
  112. return
  113.  
  114. ;**************** エラー処理ルーチン ******************
  115. エラー:
  116.     afterhangup ErrorHangup
  117.     goto HangUp
  118.  
  119. Hoshu:
  120.     message "定期保守中ですので、後程アクセスして下さい"
  121.     goto HangUp
  122.  
  123. ErrorHangup:
  124.     message "ネットワークに接続できませんでした"
  125.     goto HangUp
  126.  
  127. ;******************* 回線切断手順 *********************
  128. HangUp:
  129.     sendbreak
  130.     return
  131.