Sending a loop to multiple windows Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
papapacioli

Sending a loop to multiple windows

17 Feb 2018, 03:17

I have this simple loop that works great for a highlighted window. I would like for it to be broadcast to multiple windows with the same name. I've read through several suggestions on these forums, but each seem to have a slightly different end game that what I'm looking for.

Ideally I would like to send the loop to all windows simultaneously, but a quick 'alt-tab' cycle would also work.

Here's the loop. Thank you in advance.

Code: Select all

F5::
Toggle := !Toggle
Loop
{
If (!Toggle)
Break
Send 5
Sleep 50 
Send 6
Sleep 50
Send 7
Sleep 50
}
Return
User avatar
divanebaba
Posts: 805
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: Sending a loop to multiple windows  Topic is solved

28 Feb 2018, 18:17

Hi.
Normaly your type of sending keystrokes to a window works only for an active window.
If a foreign window is active, your script will not care and will send keystrokes even to unwanted windows, if they are active.

In your case you have to list all your multiple windows with their individual recognizing features. These can be different titles, different HWND ...
Then you have to parse this list and send the keystrokes in series.
I don't know, if your multiple windows can be recognized individually.
Einfach nur ein toller Typ. :mrgreen:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: scriptor2016 and 237 guests