Interrupted by questions about image search, please help me
Posted: 09 Apr 2015, 09:20
Interrupted by questions about image search, please help me see the code, thanks
My script is two cycles, if the first picture can not find the words, I can use the left mouse button to suspend the same token, the second picture can not find it, use the left mouse button can also be suspended.
My problem :when the script is runing, if two picture in the folder can not be found in webbrowers, then use the left mouse button to interrupt, then press and hold the left mouse button one time to be effective, if there is only a picture in the folder or not, then just click the left mouse button , I do not know what causes this condition (mouse serious delay)? How to solve
Script attached below:
F1::
loop
{
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, C:\Users\wang\Desktop\itt\1.bmp
If ErrorLevel = 0
MouseClick, left, 150, 235
break
}
if getkeystate("Lbutton",p)
break
}
loop
{
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, C:\Users\wang\Desktop\itt\2.bmp
If ErrorLevel = 0
{
x :=FoundX
y :=FoundY
xm :=x+125
ym :=y+30
MouseClick, left, 180, 520
Send 12345
break
}
if getkeystate("Lbutton",p)
break
}
return
My script is two cycles, if the first picture can not find the words, I can use the left mouse button to suspend the same token, the second picture can not find it, use the left mouse button can also be suspended.
My problem :when the script is runing, if two picture in the folder can not be found in webbrowers, then use the left mouse button to interrupt, then press and hold the left mouse button one time to be effective, if there is only a picture in the folder or not, then just click the left mouse button , I do not know what causes this condition (mouse serious delay)? How to solve
Script attached below:
F1::
loop
{
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, C:\Users\wang\Desktop\itt\1.bmp
If ErrorLevel = 0
MouseClick, left, 150, 235
break
}
if getkeystate("Lbutton",p)
break
}
loop
{
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, C:\Users\wang\Desktop\itt\2.bmp
If ErrorLevel = 0
{
x :=FoundX
y :=FoundY
xm :=x+125
ym :=y+30
MouseClick, left, 180, 520
Send 12345
break
}
if getkeystate("Lbutton",p)
break
}
return