ControlSend to specific inactive window (two inactive windows have same name)

Ask gaming related questions (AHK v1.1 and older)
clopot12
Posts: 1
Joined: 22 Mar 2020, 02:34

ControlSend to specific inactive window (two inactive windows have same name)

22 Mar 2020, 02:54

Hi friends, I have been scripting in a specific game for a while now, however I've used standard "send" commands so far while having it be my active window. Now due to WFH, I have the opportunity to just leave a script on all the time while I get my work done. However, I can't seem to get ControlSend to work. I've used ControlSend before, but this situation is new because this game has a launcher and a client, both with the same name.

Usually I would just do:

Code: Select all

loop {
send a
sleep 200
}
or for ControlSend:

Code: Select all

loop {
ControlSend,, a, Notepad
sleep 200
}
I then tried to get the different IDs of the launcher + client and then tried to do this:

Code: Select all

loop {
ControlSend,, a, ahk_id 0x40562
sleep 200
}
but it only works while the game is my active window. As soon as I swap off to another window, it stops working. What am I missing here?

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 85 guests