it's reads my emails and click on the links.
the issue is, after opening my email, some clicks open new tabs/windows/pop ups
Q : how can i make the script keep the focus/work on the targeted window and ignores others.
Code: Select all
;#Warn
#NoEnv
#Persistent
; #WinActivateForce
#MaxThreadsPerHotkey 4
#SingleInstance, force
SetBatchLines -1
settitlematchmode 2
CoordMode, Pixel, Window
Coordmode, Mouse, Window
CoordMode, ToolTip, Screen
SetWorkingDir %A_ScriptDir%
F2::Reload
F1::
; WinSet, AlwaysOnTop, On, A
TxtFile_5 := A_ScriptDir "\0.cvc"
Loop, Read, % TxtFile_5
{
_Click_ := A_Index
Loop, Parse, A_LoopReadLine, % A_Tab
{
Arr_Coord := StrSplit(A_LoopReadLine, "`, ")
_Pos_ := % "x" . Arr_Coord[1] . A_Space . "y" . Arr_Coord[2]
MouseMove, Arr_Coord[1], Arr_Coord[2]
ToolTip, % "Loop : " . _Click_ . "`nClick " . _Pos_
ControlClick, % _Pos_, A,, Left, 1, NA
}
Sleep, 1500
}
; WinSet, AlwaysOnTop, Off, A
MsgBox, Done
ToolTip
return