FindClick() - ImageSearch, Clicking, & More [Newest Version]

Post your working scripts, libraries and tools
User avatar
berban
Posts: 83
Joined: 14 Apr 2014, 03:20

Re: FindClick() - ImageSearch, Clicking, & More [Newest Version]

31 Mar 2019, 19:02

Hi Oblituarius, happy to help. I just tried using the directional option (e.g. "bottom") and was dismayed to find it didn't seem to be working. There's a bunch of options in here that I don't really use myself, and unfortunately sometimes when I tweak something sometimes it screws up something elsewhere. I'm guessing that's what happened here. I'll take a look and let you know once I figure it out.
gverrilla1
Posts: 6
Joined: 26 Mar 2019, 23:31

Re: FindClick() - ImageSearch, Clicking, & More [Newest Version]

02 Apr 2019, 13:52

Hey guys, I don't know why this isnt working, can you please help?

Code: Select all

^!m::  ; Control+Alt+M hotkey.
Loop
{
FindClick("F:\tidle\worker.png", "n2 e o20")


Sleep, 60000
}
I'll run the script, open the target-window, and press ctrl+alt+m.
There are 6 instances of this image on my screen, but it's only finding 2 of them.
Second problem is that after finding them, the click doesnt work. I have used "dx" on options to see if it was clicking the right place, and it was. But the clicking doesnt work.
What can I do? Tried n3 aswell. And Sleep20 and Sleep50.
Dx doesn't shoot any error btw.
geniishii
Posts: 1
Joined: 04 Jun 2019, 09:08

Re: FindClick() - ImageSearch, Clicking, & More [Newest Version]

04 Jun 2019, 09:17

Hi! Amazing work you've done here.

Im struggling a bit with what im trying to do. So i have a small image 22x18. Im trying to find how many times it appears ( i can expect 0-6 appearances in the screen). However the only way to see the image is to be hovering over the item's tooltip and since the mouse moves while im using the FindClick (), then it'll never detect it. Is there any way to use the function and allow the mouse to stay static while the function searches over the image?

; Moving mouse to tooltip
MouseMove, 10, 25, 0, R
;Initializing Id var
IdCount = 0
;Searching for img in tool tip
IdCount := FindClick(A_ScriptDir . "\dmgtop1.png", "Count o20")
;Results
MsgBox, %IdCount%
User avatar
berban
Posts: 83
Joined: 14 Apr 2014, 03:20

Re: FindClick() - ImageSearch, Clicking, & More [Newest Version]

05 Jun 2019, 19:35

Yeah, you can use the "n" option to not click on anything. The mouse will not move either in that case.
carno
Posts: 196
Joined: 20 Jun 2014, 16:48

Re: FindClick() - ImageSearch, Clicking, & More [Newest Version]

09 Jun 2019, 15:41

This script is in the top 5 of the best AHK has ever offered the community. :bravo:
godofOOF
Posts: 24
Joined: 22 Dec 2018, 06:03

Re: FindClick() - ImageSearch, Clicking, & More [Newest Version]

21 Jun 2019, 15:50

This script seems to not work for me
User avatar
berban
Posts: 83
Joined: 14 Apr 2014, 03:20

Re: FindClick() - ImageSearch, Clicking, & More [Newest Version]

26 Jun 2019, 21:25

Thanks for the kind words carno! :)

Could you provide me with more details, godofOOF?

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 41 guests