Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative image match / click (like ui.vision's XClickRelative) #601

Open
johtso opened this issue Jun 26, 2024 · 3 comments
Open

Relative image match / click (like ui.vision's XClickRelative) #601

johtso opened this issue Jun 26, 2024 · 3 comments

Comments

@johtso
Copy link

johtso commented Jun 26, 2024

So, ui.vision has a really handy feature where you can take an image of a portion of the ui, draw a green box around some consistent anchor point, and a pink box around the area that you want to interact with.

An example is a label for a form field, and then clicking on the input box that contains changing / dynamic data.

Is this something that can currently be done with nut? I didn't see anything in the docs.

I don't know if ui.vision does anything more clever than matching on the area in the green box and then calculating an offset using the relative position of the pink box.

https://ui.vision/rpa/docs/xclick

image

@s1hofmann
Copy link
Member

Hi @johtso 👋

I'll have to check out the link you provided in detail before I can answer this thoroughly.
I'll take some time to do so, please be patient :)

@s1hofmann
Copy link
Member

@johtso Maybe I’m missing something, but what’s the purpose of the green box, exactly?

If I understand this correctly it first searches for the green box, then searches for the pink box and moves the cursor there.
But it has to search for the pink one anyways, so what’s the point of having the green one?

@johtso
Copy link
Author

johtso commented Jul 5, 2024

@s1hofmann I think the idea is it never searches for the pink area, it just clicks relative to the green area based on distance. This means the pink area can be targeted even if the contents changes so dramatically it couldn't be reliably matched visually.

Basically it's an easy way to specify a visual region and an offset. After taking the screenshot it would pop up a little image editor type thing that allows you to apply the markup.

I'm imagining maybe you'd have a vscode extension that activates a region selection tool, and then saves it to a sensible place in your project and adds the reference to your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants