Find Image Logo Which Has Multiple Different Color Options

Hello People,

So – trying to press on with icons that keep changing color depending on the video that is playing and therefore make my found image actions prone to failure.

Any work around?

Here some examples of the different colors it gives me:

image
image
image

I was thinking if i could turn all those image into grayscale I would have an easier dealing with this situation.

Any help is appreciated.

Best regards,
Inc

The only mention of greyscale is a post I made a while ago. So it might be worth checking it out:

1 Like

You can't use grayscale. That's been wished for before but isn't currently possible.

The only thing I can think of for to do is loop through a group of possible images, although you might possibly be able to combine some close variations by adjusting the fuzz factor in the actions.

1 Like

Do you have to use those images? Is there something else -- corner of the window, another image that doesn't change -- that's a constant offset from the place you want to click that you can use as an anchor?

1 Like

Might be worth zooming back and explaining the problem which you thought to solve with polychrome graphic searches.

What's the context ?

Might a relative positional click look feasible ?

@ccstone

Thanks u. I also ended up figure that out the hard way last night when I had finally gotten my greyscale function to work and KM wouldn't pick up on the greyscale and just look at the actual color, sad

@ComplexPoint & @Nige_S

They colors are always different. I was trying to do a simple function where I enter picture-in-picture more on my browser. Usually YouTube create a custom background based on the content of the video u are watching and the reason where I couldn't hard code the placement of the cursor is because on some other website (mostly Netflix, let me know if u know some more they place the icon at different positions)

Here are some examples to better explain.

Example of YouTube:

LOL well just realize my temporary solution doesn't work anymore looks like YouTube has multiple display interfaces.

Here a Netflix picture-in-picture:

So u can see that the icon to open the picture-in-picture are all located at different placement.

I had created a version that work by checking a OCR and if the tag was Netflix press on a different placement.

Here's a look at my current macro:

Hopefully this help better explain what I'm trying to accomplish.

Given this is in a browser, and given that there are Chrome extensions that enable PiP by keystroke, it's possible that you could do this with an "Execute JavaScript in Browser" action.

I have no idea how to do this! Just throwing it out there in case it sparks something for somebody else...

An Execute JS in Browser action does have access to the browser's main JS evaluation space, but not, I think, to the separate evaluation space of a Chrome extension.

1 Like

I'm way, way, out of my depth here and waiting to be shot down in flames -- but don't extensions interact with the browser via JavaScript? The implication being that if an extension can trigger the PiP function then a KM "Execute JavaScript" action could too.

Of course, that could be the naïveté of the ignorant :wink:

@ComplexPoint is quite right – by design browser extensions are completely sandboxed from the page-level context Keyboard Maestro has access to, and that safeguard is in place to prevent scripts from doing mischief at the OS level.

Plug-ins also have access to app-level browser features that aren't defined in the JavaScript specification.

However – @MikeTheClicker has demonstrated that magic can happen if you're capable of writing your own browser extension:

How To Trigger Macros Automatically From Google Chrome

2 Likes

...and

Gotcha. Thanks, guys, for patiently setting the noob straight!

Seems like you had the right idea to just go with a Chrome Extension.

Google provides their own extension : Picture-in-Picture Extension

Which literally is the same thing as the browser built in feature but with less options but has a built in keystroke (option+p) to open up picture-in-picture mode.

Sadly ended up not being KM related but thanks for everyones help and ideas.

Really appreciated.

3 Likes