Page 6 of 6

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

Posted: 31 Mar 2019, 19:02
by berban
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.

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

Posted: 02 Apr 2019, 13:52
by gverrilla1
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.

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

Posted: 04 Jun 2019, 09:17
by geniishii
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%

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

Posted: 05 Jun 2019, 19:35
by berban
Yeah, you can use the "n" option to not click on anything. The mouse will not move either in that case.

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

Posted: 09 Jun 2019, 15:41
by carno
This script is in the top 5 of the best AHK has ever offered the community. :bravo:

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

Posted: 21 Jun 2019, 15:50
by godofOOF
This script seems to not work for me

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

Posted: 26 Jun 2019, 21:25
by berban
Thanks for the kind words carno! :)

Could you provide me with more details, godofOOF?

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

Posted: 05 Sep 2019, 05:21
by arazu
o/

**found a fix
FindClick("img/1.png", "dx o65 r" )

r := "" targetwindow "" , r_user := "" targetwindow ""

thanks :bravo:

the findclick is great and powerful
i got a small issue with the "r" option

im trying to push r "" "" %targetwindow% "" ""

it wont let me use any % on the r title only direct name of window works.

can i bypass it?

"global targetwindow := "No window Picked" ;Window name"

"connected to edit box
Gui, Add, Edit, x100 y5 w100 h18 +0x200 vtargetwindow gsubmit_all, %targetwindow%"

"F2::
MouseGetPos,,,guideUnderCursor
WinGetTitle, Title, ahk_id %guideUnderCursor%
;Msgbox, %Title%
GuiControl,,targetwindow, %Title%
Gosub,submit_all
Return"

i want to be able to put a %% window title so user can keep pick window with simple f2


atm my target tester look like this

#Include Core/FindClick.ahk
global targetwindow := "Mirror2" ;Window name


WinGetPos, X, Y, Width, Height, %targetwindow%
X1 := X
Y1 := Y
W := Width
H := Height
X_end := (X1 + W)
Y_end := (Y1 + H)
Loop

{
;MsgBox, %targetwindow%
;FindClick()
FindClick("img/1.png", "dx o65 r" "Mirror2" )
sleep, 5000
}

F8::ExitApp