home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / OLS / Winnt / HTNT306 / HTNT306.LZH / PEOPLEIN.SCR < prev    next >
Text File  |  1996-02-09  |  2KB  |  92 lines

  1. ; People用汎用ログインスクリプト
  2. ; by 斉藤秀夫
  3. ; このスクリプトは作者に許可なく自由に改版、転用してかまいません。
  4. ;
  5. ; IDやパスワードを変更したい場合は、秀Termの「スクリプト・変数一覧」で、
  6. ; IDを変更したい場合:  %PeopleID
  7. ; パスワードを変更したい場合: %%PeoplePassword
  8. ; を修正して、正しい値を設定してください。
  9. ;
  10.  
  11.     gethostname #key
  12.     #key = "Software\Hidemaruo\PeopleInScript\" + #key
  13.     ##HPAM = 0
  14.     openreg "CURRENTUSER", #key
  15.     if( yes )
  16.         getreg "HPAM", ##HPAM
  17.         closereg
  18.     endif
  19.  
  20.     timeout 4
  21. Restart:
  22.     switch
  23.         case "Host_Name:"
  24.             send "P^M"
  25.             goto Restart
  26.         case "UserID:"
  27.             goto EnterUserID
  28.         case timeout
  29.             send "@"
  30.             sleep 1
  31.             send "^M"
  32.             timeout 10
  33.             switch
  34.                 case "*"
  35. SendPAMRestart:
  36.                     if( ##HPAM )
  37.                         send "A HPAM^M"
  38.                     else
  39.                         send "A PAM^M"
  40.                     endif
  41.                     switch
  42.                         case "*"
  43.                             if( ##HPAM )
  44.                                 ##HPAM = 0
  45.                             else
  46.                                 ##HPAM = 1
  47.                             endif
  48.                             createreg "CURRENTUSER", #key
  49.                             writeregint "HPAM", ##HPAM
  50.                             closereg
  51.                             goto SendPAMRestart
  52.                         case "UserID"
  53.                             goto EnterUserID
  54.                         case timeout
  55.                             error "ホストが応答しません。"
  56.                     endswitch
  57.                 case "UserID:"
  58.                     goto EnterUserID
  59.                 case timeout
  60.                     error "ホストが応答しません。"
  61.             endswitch
  62.     endswitch
  63. EnterUserID:
  64.     if( %PeopleID == "" )
  65.         input "ユーザIDを入力してください。", %PeopleID
  66.         if( cancel )
  67.             hangup
  68.         endif
  69.     endif
  70.     send %PeopleID + "^M"
  71.     wait "Password:"
  72.     if( timeout )
  73.         error "ホストが応答しません。"
  74.     endif
  75.     if( %%PeoplePassword == "" )
  76.         secretinput "パスワードを入力してください。", %%PeoplePassword
  77.         if( cancel )
  78.             hangup
  79.         endif
  80.     endif
  81.     send %%PeoplePassword + "^M"
  82. WaitLogoff:
  83.     timeout 0
  84.     wait "^M^Jただいまの時刻:"
  85.     timeout 5
  86.     wait "DISCONNECTED - DTE CLEARING"
  87.     if( timeout ) goto WaitLogoff
  88.     wait postidle(1) "*"
  89.     if( timeout ) goto WaitLogoff
  90.     hangup
  91.  
  92.