Page 1 of 1

Image search not working in Zoom

Posted: 17 Oct 2021, 23:13
by Fulminare
I made a script that searches for the following image (ref img #1)

and clicks at the location of that image. I know that zoom has an auto admit feature. But I wanted some more functionality.

Code: Select all

imgFound := false
while(imgFound = false)
{
imageSearch, x, y , 0, 0, 1000,600, Admit.png
if(x <> "")
{
SoundBeep, 300, 500
Sleep 7000
MouseClick, left, 993,74
imgFound := true
}
}
The image is getting detected in the file explorer. ( like the preview image ) (ref img #2) and it is sounding the beep and then clicking at the set coordinates.

But not in zoom where it is actually shown (ref img #3)


Can someone please tell me what I should do ?


Regards

Re: Image search not working in Zoom

Posted: 17 Oct 2021, 23:21
by Hellbent
What happens if you just click the button? [i.e. click, x, y ] (no image search or anything else, just click it.)

Re: Image search not working in Zoom

Posted: 17 Oct 2021, 23:27
by Fulminare
you mean I should try out

Code: Select all

MouseClick, left, 993,74
and see if it clicks at that location ?

edit: I have tried that and it is working. (clicking at the desired location)

Re: Image search not working in Zoom

Posted: 17 Oct 2021, 23:32
by Hellbent
Fulminare wrote:
17 Oct 2021, 23:27
you mean I should try out

Code: Select all

MouseClick, left, 993,74
and see if it clicks at that location ?

edit: I have tried that and it is working. (clicking at the desired location)
Are you using the correct CoordMode in your image search script?

Re: Image search not working in Zoom

Posted: 17 Oct 2021, 23:55
by Fulminare
I am not using CoordMode

Like the script I posted here is the one I am using.

I am using the same script for other actions in Zoom and they are working fine.

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 00:04
by Hellbent
Try this script and see if it detects the button in zoom.
viewtopic.php?f=6&t=60949
( I have a simple image search script for testing these types of things but I don't know where I have it. I just found the thing a few days ago too...)

Anyways, if the script I directed you to doesn't work it is likely because the button is on a window layer that ImageSearch / pixelsearch can't see ( just like how your cursor doesn't get detected).

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 03:37
by Fulminare
I am trying your pixel predator

I was able to get the colour and the search area.

But despite watching the YouTube video I didn't understand how to make it click on that colour in that area

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 03:53
by Hellbent
Fulminare wrote:
18 Oct 2021, 03:37
I am trying your pixel predator

I was able to get the colour and the search area.

But despite watching the YouTube video I didn't understand how to make it click on that colour in that area
Press the "C" button to set the values to the default click config.

In truth you don't need it to click it, you just need to test to see if it can find it. You can do that by by pressing the "M" button (move) and setting the value of the first value to a "0" so it just runs once. If it moves, it can find it. That should be enough to know that a image search is at least possible.

Code: Select all

*0*0*1*10*10*Left*30*30*500*

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 04:12
by Fulminare
Well after I set the colour and started it, the mouse kept going to the colour preview in the pixel predator.

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 04:17
by Hellbent
Is it the 1st of April already?

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 04:34
by Hellbent
Temp (1).gif
Temp (1).gif (336.96 KiB) Viewed 1233 times

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 04:50
by Fulminare
Hellbent wrote:
18 Oct 2021, 04:34
Temp (1).gif
That did not happen. ( with reference to the gif you have posted) I was not able to move the cursor as it kept going to the colour preview in the pixel predator. whenever I tried to move the mouse, it would simply go to the colour shown in the pixel predator.

I had to open task manager and stop the program.

I clearly did something wrong. Wil try once again

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 04:56
by Fulminare
Your gif really helped. Thank you :)

it is working. Tested it in zoom.

So now that goes to prove that an image is being detected.

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 15:56
by Hellbent
Fulminare wrote:
18 Oct 2021, 04:56
Your gif really helped. Thank you :)

it is working. Tested it in zoom.

So now that goes to prove that an image is being detected.
:thumbup:

You might want to try setting your coordmode to Screen for Pixel and Mouse

Code: Select all

CoordMode, Mouse, Screen
CoordMode, Pixel, Screen

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 20:22
by Fulminare
It's working everywhere other than in Zoom :/

Re: Image search not working in Zoom  Topic is solved

Posted: 18 Oct 2021, 20:52
by Hellbent
Fulminare wrote:
18 Oct 2021, 20:22
It's working everywhere other than in Zoom :/
Well seeing that the button has a distinct color and position you can just go with pixel search instead of image search.

Re: Image search not working in Zoom

Posted: 18 Oct 2021, 23:06
by Fulminare
Thanks for the advice. :)

It is working.

Code: Select all

CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
x:= 993 ;x coordinate of pixel to check.
y:= 74 ;y coordinate of pixel to check.
targetcolor:= 0xEB710E ;color to be matched in hexadecimal blue-green-red (BGR) format.

Loop
{
   
   PixelGetColor, currentcolor, x, y
    if (currentcolor=targetcolor)
    {
		SoundBeep, 300, 500
        Sleep 7000
        MouseClick, left, 993,74
	}
    else
    {
        ;do something
    }
}