I get the following error when I try to send send the character "(" or ")" using SendKeys. In my vbscript.
Invalid procedure call or argument
My script:
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 100
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Documents and Settings\Administrator\Desktop\readme.txt", 1)
Wshshell.SendKeys "!@#$%^&*()"
Do Until objFile.AtEndOfStream
strCharacters = objFile.Read(1)
WshShell.SendKeys strCharacters
Loop
It does not send "(" and ")" when I try to send them before the loop, but it does not show any errors and continues until it encounters another "(" character "and stops with the error.
Jonah source
share