2021-11-01

[筆記][cmd]自動登入ptt

有時候就是會忘記登入PTT,寫個BAT就可以加入排程自動登入了

但這是採用vbs的鍵盤輸入, 一點點小差錯就會導致此程式失敗,將就用囉

 

 

@echo off
echo set sh=WScript.CreateObject("WScript.Shell")>telnet_tmp.vbs
echo WScript.Sleep 500>>telnet_tmp.vbs

echo sh.SendKeys "^+(0)" >>telnet_tmp.vbs
echo WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "username{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 300 >>telnet_tmp.vbs
echo sh.SendKeys "password{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 500 >>telnet_tmp.vbs
echo sh.SendKeys "{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 300 >>telnet_tmp.vbs
echo sh.SendKeys "g{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 300 >>telnet_tmp.vbs
echo sh.SendKeys "y{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 1500 >>telnet_tmp.vbs
echo sh.SendKeys "y">>telnet_tmp.vbs
echo WScript.Sleep 800 >>telnet_tmp.vbs
echo sh.SendKeys "y">>telnet_tmp.vbs

start telnet ptt.cc
cscript //nologo telnet_tmp.vbs
del telnet_tmp.vbs 









 

 

 

 

 

參考網址:https://www.twblogs.net/a/5b8756ed2b71775d1cd699e7 

 

結果搞半天還是去下載了PCMAN並用自動回訊功能登入

https://blog.xuite.net/doghome16/wish/588859489

 

沒有留言:

張貼留言