1
我寫了一個非常簡單的VBS程序,以便不同的程序可以調用它,以便使用SendKeys
方法。當我只寫出一個簡單的字符串來測試它是這樣的:SendKeys不能使用變量
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "testing"
它工作得很好。但是,當我在地方的字符串使用等效變量,像這樣:
Set WshShell = WScript.CreateObject("WScript.Shell")
Set thingy = "testing"
WshShell.SendKeys thingy
它提供了以下錯誤調用時:
我不明白。因爲我沒有使用'Set' – user206168 2018-03-02 16:40:29