Code: Select all
stuck = 0
while stuck<5
{
PixelSearch, Px, Py, 446, 356, 799, 508, 0x04051E,3 , fast RGB
if ErrorLevel
break
else
;---------------------------------------------------- clicking
MouseGetPos, oldx, oldy
MouseMove, %px%, %py%
Sleep, 200
Send, {Ctrl Down}
Click
Send, {Ctrl up}
MouseGetPos, newx, newy
if (oldx =newx and oldy = newy)
{
stuck++
MsgBox, ,,number of stucks triggered %stuck%,1
}
;---------------------------------------------------done
}
"if (oldx =newx and oldy = newy)" I've also tried
if (oldx and oldy = newx and newy)
and so many other varations, i just can't figure it out.