I have made a script to send enter at once to multiple windows of hidden processes of the same class, but sadly it works as i want randomly
for example, i want to send enter to 16 windows, sometimes it sends very fast as i want, some other times it sends but slower than what i want leading to achieve 50-70% of the desired purpose
so, may anyone kindly suggest a solution for this?
Thanks in advance
here's my script
Code: Select all
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%
DetectHiddenWindows, on
toggle = -1
#MaxThreadsPerHotkey 20000000000000
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
Process, Priority, , A
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
;OPTIMIZATIONS END
q::
sleep, -1
WinGet, winList, List, ahk_class pek
sleep, -1
loop, %winList%
sleep, -1
loop,
{
SetControlDelay -1
sleep, -1
ControlSend,, {Enter},% "ahk_id " winList%a_index%,,,, NA
sleep, -1
}
Return
^esc::exitapp
+z::suspend
^Numpad0:: Reload[/Codebox]