我需要一些幫助。我是VBS的新手,我想寫一個玩電子遊戲的機器人來打字。如何在使用VBS的消息框上按「OK」時停止循環?
set sellAllTyping = wscript.CreateObject("WScript.Shell")
x= MsgBox ("To stop the bot, click OK. /// Coded by Vncz with a little help from StackOverflow! :^) RIP Yams ;-;",vbOK+vbInformation,"sell all Bot")
if x=vbOK then
' *** I don't know what to write here. ***
sellAllTyping.sendkeys "t"
wscript.sleep 1000
sellAllTyping.sendkeys "/sell all"
wscript.sleep 1000
sellAllTyping.sendkeys "{ENTER}"
wscript.sleep 5000
loop
我想在最後一站有循環,如果我在我召喚的消息框上按OK鍵。代替評論,我應該寫什麼代碼,如果我甚至做對了?謝謝!
這個工作,感謝,人!我認爲5天后檢查是沒有希望的,但我今天回來了。謝謝;) – Vncz
太棒了!很高興看到問題解決 – Tommy