I have a small script that brings an open program (Notepad) into focus, and then waits a second before sending the program the function
CTRL S. This script works 50% of the time, while the rest of the time the script makes an error and actually sends a capital S letter right into the .txt file I am editing instead of sending
CTRL S (which is command to save).
Below is the content of the script:
' Create WScript Shell Object to access filesystem. Set WshShell = WScript.CreateObject("WScript.Shell") ' Select, or bring Focus to a window named `NOTEPAD` WshShell.AppActivate "Notepad" WScript.Sleep 1000 WshShell.SendKeys "^s"
Can anyone tell me how this error is occurring? I thought perhaps it was becuase I had CAPSLOCK on, but that was not the case.
Running Windows & 64 bit.