I have a few skripts which use ControlSend in combination with "WinGet, active_id," to send keystrokes to specific windows.
The problem with ControlSend is, that I can not use CTRL or ALT ect. while they are active since it effects the Script.
Is there any alternative to ControlSend in this case?
Here is my code:
Code: Select all
playing:=false
^Up::
if (!playing) {
WinGet, active_id, ID, A
SetTimer, 1, 150
SetTimer, 2, 19500
SetTimer, 3, 1805000
playing:=true
}
return
^Down::
if (playing) {
SetTimer, 1, Off
SetTimer, 2, Off
SetTimer, 3, Off
playing:=false
}
return
1:
ControlSend, , 1, ahk_id %active_id%
Sleep 50
ControlSend, , v, ahk_id %active_id%
Sleep 50
ControlSend, , 4, ahk_id %active_id%
return
2:
SetTimer, 1, Off
Sleep 1250
ControlSend, , 2, ahk_id %active_id%
Sleep 1000
ControlSend, , 3, ahk_id %active_id%
Sleep 2000
ControlSend, , 5, ahk_id %active_id%
SetTimer, 1, On
return
3:
SetTimer, 1, Off
SetTimer, 2, Off
Sleep 1000
ControlSend, , 6, ahk_id %active_id%
Sleep 500
SetTimer, 1, On
SetTimer, 2, On
return
Thanks in advance!
Baldemord