Kindly see below the initial code. After this image is found I want to click below this image after some gap.
Code: Select all
Loop, 100
{
ImageSearch, x, y, 81, 26, 1087, 456, *75 woodegg2.png
If (ErrorLevel = 0)
break
}
Code: Select all
Loop, 100
{
ImageSearch, x, y, 81, 26, 1087, 456, *75 woodegg2.png
If (ErrorLevel = 0)
break
}
I think Mouse click will just click directly on the image. I don't want to click on the image.
it depends on how to use it.I think Mouse click will just click directly on the image
Code: Select all
ImageFile := "woodegg2.png"
; This is to get the image width and height.
Gui, Add, Pic, vImg, % ImageFile
GuiControlGet, oVar, Pos, Img
Gui, Destroy
;---------------------------------------------------------------
ClickDistance := oVarH + 20
F1::
ImageSearch, X, Y, 81, 26, 1087, 456, *75 %ImageFile%
If (!ErrorLevel) {
MouseClick, Left, X, Y + ClickDistance
}
Return
Users browsing this forum: benzynowy tato and 45 guests