image detection and click above

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
chango
Posts: 30
Joined: 27 May 2017, 12:10

image detection and click above

27 Jul 2017, 15:19

Hi, I've had a lot of success with AHK, but I'm having a bit of trouble trying to work out how , after I find an image the mouse moves exactly.. so many pixels / mm etc above it and then clicks. I don't want it to find a second image as the same image appears everytime, but the image I'm searching for only appears sometimes below the other image. So what I'm looking for is clicking at coordinate relative to the image.

Hope I'm trying to explain this right, sorry if I'm not. ;)
Vh_
Posts: 203
Joined: 17 Mar 2017, 22:06

Re: image detection and click above

28 Jul 2017, 19:30

Give this a try. ;untested.. but used it before I think

ImageSearch, outX, outY, x1, y1, x2, y2, Image.jpg

MouseClick, Left, %outX%, %outY%-50, 1, 0 ;use the variable stored as the coordinate + or - X amout of coords

Hope it helps!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 356 guests