Hallo,
provided that the 2nd monitor is to the right of the 1st monitor according to its coordinates, try:
Code: Select all
#MaxThreadsPerHotkey 2
F9::
enable := !enable
SoundBeep, 1000 + 500 * enable
While enable
{
WinGet, wowid, List, World of Warcraft
Loop, %wowid%
{
WinGetPos , X,,,,% "ahk_id " wowid%A_Index%
IF (X + 10 > A_ScreenWidth)
ControlSend,, r,% "ahk_id " wowid%A_Index%
}
Random, r, 25000, 35000
Sleep, r
}
Return
(If you were also familiar with the World of Autohotkey, you would use a
Timer instead of
#MaxThreadsPerHotkey 2 and the long
Sleep.)