Sign in to follow this  
Followers 0
Timppa

Image Search cannot recognize if mouse above

9 posts in this topic

Hello!

I have a problem with ImageSearch (https://www.autoitscript.com/forum/topic/148005-imagesearch-usage-explanation/), I got it working after numerous attempts.

I am currently using that ImageSearch2015.au3 and it works like a wonder, but there is one problem: If my cursos is above the picture, it will not recognize the picture anymore until I move the cursor off from the picture. Is there any idea how to fix this without making a function that moves the mouse off from the picture if not found? Rather not use that function, because it would move mouse all around if it's trying to find for picture (there is loop to check if there's a picture).

 

Thanks in advance! :)

Share this post


Link to post
Share on other sites



Just like this:

Func FindPic()
    Local $SearchPic = _ImageSearch(@ScriptDir & "\iUpdateButton.png", 0, $imgX, $imgY, 10)
          If $SearchPic == 1 Then
            DoThis()
          Else
            AdLibRegister("FindPic",1000)
          EndIf
EndFunc

 

Share this post


Link to post
Share on other sites

I would think that the mouse pointer changes the displays image with its cursor as you found out,

Jos

1 person likes this

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I would think that the mouse pointer changes the displays image with its cursor as you found out,

Jos

Wow, I'm totally stupid... :>

I am color blinded so I did not realize that until I moved my cursor quickly on and off from the button...

Thanks Jos! :)

Share this post


Link to post
Share on other sites

Hello, I'm interesting How You answered Your problem with imagesearch ?

I have the same issue, when search is looped
I don't want to move mouse out f searched picture, I want rather hide pointer, I'm thinking about ControlClick
What is best way ?

Share this post


Link to post
Share on other sites

Be patient, Timppa last visit in forum was 3. January, i don't know if and when he comes next time.

Share this post


Link to post
Share on other sites
On 31.3.2016 at 9:27 AM, WiValdiBB said:

Hello, I'm interesting How You answered Your problem with imagesearch ?

I have the same issue, when search is looped
I don't want to move mouse out f searched picture, I want rather hide pointer, I'm thinking about ControlClick
What is best way ?

I took picture for the non-hovered button sprite and a picture of hovered button sprite.

On 31.3.2016 at 10:35 AM, AutoBert said:

Be patient, Timppa last visit in forum was 3. January, i don't know if and when he comes next time.

Yeah, I changed from autoit to Java.

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0