I'm creating an ahk script where I am trying to single to use the same logic across multiple Process IDs.
I have more than 5 of this window class / process name running, so I'm using the ahk_pid to specify the 2 that I want the script to run for.
I could open 2 separate files and specify a single ahk_pid in each, but is there a way to specify 2+ ahk_pids within a single script file?
When I try something similar to below, the script works for only the top pid.
pid = 1234
pid2 = 4321
WinGetTitle, clickTitle, ahk_pid %pid%
WinGetTitle, clickTitle, ahk_pid %pid2%
WinGetClass, clickClass, ahk_pid %pid%
WinGetClass, clickClass, ahk_pid %pid2%