am new here so please take it easy on me :). i have strange issue using this VB script below to enter data on a Notepad. The code i send using the "SendKeys" to the notepad is changed every time. i noticed the script working great except if the text i send is containing the "(" or ")" and if that happen i get error "Invalid procedure call or argument" and only have of the text print.
part of my code is below ( i couldn't attach it fully ):
Wscript.Sleep 300
objShell.SendKeys "zDYg8/bY)b6Ox$z"
Read and follow
SendKeys
method reference:Edit. The answer was given for a particular string literal.
Use either Replace Function or Replace Method (VBScript) to modify a string variable to
SendKeys
-compliant format, e.g. as in the following code snippet:Edit #2: braces require special treatment, and must be handled first!
Edit #3 - final solution: omit
Replace
at all: