Simulating Held Keys With Send()

3 posts in this topic

Hokuyo 0

A program I wish to automate requires that I hold the 's' key down for a little less than a second. After checking the online documentation and searching the forums, I found that the only suggested way to do this

Send("{s down}")

Sleep(800)

Send("{s up}")

does not help me. To test this, I wrote

Run("notepad.exe")

WinActivate("Untitled - Notepad")

WinWaitActive("Untitled - Notepad")

Send("{s down}")

Sleep(10000)

Send("{s up}")

figuring that if I held 's' for ten seconds in notepad, multiple 's's would appear in the edit box. This this didn't work for me either. Any ideas?