Help File wrote:
Unlike the Send command, mouse clicks cannot be sent by ControlSend. Use ControlClick for that.
Code:
;Grab unique window ID's
WinGet, WinId, List, Untitled - Notepad
ClonesPush(strKeys)
{
global WinId1
global WinId2
IfWinNotActive, ahk_id %WinId1%
ControlSend, , %strKeys%, ahk_id %WinId1%
IfWinNotActive, ahk_id %WinId2%
ControlSend, , %strKeys%, ahk_id %WinId2%
}
ClonesClick(strKeys)
{
global WinId1
global WinId2
IfWinNotActive, ahk_id %WinId1%
ControlClick, , ahk_id %WinId1%, , %strKeys%,
IfWinNotActive, ahk_id %WinId2%
ControlClick, , ahk_id %WinId2%, , %strKeys%,
}
~Space::ClonesPush("{Space down}{Space up}")
~a::ClonesPush("{a}")
~b::ClonesPush("{b}")
~c::ClonesPush("{c}")
~RButton::ClonesClick("Right")
~LButton::ClonesClick("Left")
x::ExitApp
Weird...
