Page 1 of 1

unsure on how to send keystrokes to a window

Posted: 26 Apr 2022, 21:33
by General Grievous
I'm trying to make the script attached below to send to only a specific window. I know you need to use controlsend to make it work, but unsure how to implement it.

Re: unsure on how to send keystrokes to a window

Posted: 26 Apr 2022, 21:42
by SirSocks
It looks like you may have forgotten to share your script. However you can use Content Sensitive hotkeys, such as #If.
Here's some more info on it.....
https://www.autohotkey.com/docs/commands/_If.htm

Re: unsure on how to send keystrokes to a window

Posted: 30 Apr 2022, 00:45
by General Grievous

Code: Select all

=::
SetTimer, AS,  17000
Send, {LButton Down}{s Down}
Return
AS:
Send,% GetKeyState("s")?"{s Up}{a Down}":"{a Up}{s Down}"
Return
-::
SetTimer, AS, Off
Send, {LButton Up}{s Up}{a Up}
Return
here's the cript

Re: unsure on how to send keystrokes to a window

Posted: 30 Apr 2022, 09:49
by mikeyww