Identify pattern in some form

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
rafaelrsss
Posts: 13
Joined: 09 Nov 2016, 07:11

Identify pattern in some form

10 Nov 2016, 07:51

Huy guys.

Not sure if this is a newbie question (probably is the case) but there is a way to identify a text pattern inside a form? Please refer to the following image:

Imagegif image hosting

I would like to make an script to hit space if text pattern "MEASURED" and "98.40" is dettected. Looping through all entries (rows).

Cudos from Brazil.
User avatar
boiler
Posts: 16925
Joined: 21 Dec 2014, 02:44

Re: Identify pattern in some form

10 Nov 2016, 21:38

I'm thinking it's probably not the case, but if you press control-C while the row is highlighted, does it copy the text of that row to the clipboard? If so, then you can identify the pattern of the text and act upon it as you want. If not, you probably can't do it by matching text.

However, if it's truly only when the highlighted row contains exactly "MEASURED" and "98.40" that you're looking for, then you can easily do it using ImageSearch. Just make reference images of those two pieces of text when they are highlighted. Then you would have two ImageSearch commands that search the entire window for those two pieces of highlighted text, and they will both match only when the highlighted row contains them both. You might need to use a lot of allowable variance for the "98.40" ImageSearch because it can start in a different "x" position, which means the anti-aliasing of that text can be a little different depending on where it shows up (as opposed to "MEASURE" since it consistently starts at the same "x" position so it should always look the same).
rafaelrsss
Posts: 13
Joined: 09 Nov 2016, 07:11

Re: Identify pattern in some form

11 Nov 2016, 06:07

boiler thanks for your help.

Just checked here and the answer is no, when I ctrl+c this objects nothing is copied to the clipboard.
I will probably have to use imagesearch although I am not experienced with it. Never used actually.
User avatar
boiler
Posts: 16925
Joined: 21 Dec 2014, 02:44

Re: Identify pattern in some form

11 Nov 2016, 06:32

It's really pretty easy, especially in this case where finding the location isn't the issue because getting the coordinate modes correct is often a source of confusion. In your case, you're just looking for the reference images to appear anywhere, so there's less to worry about. Try it out and post if you have issues.
rafaelrsss
Posts: 13
Joined: 09 Nov 2016, 07:11

Re: Identify pattern in some form

11 Nov 2016, 07:26

Yeah I will try that during the next days. Thanks!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AlFlo and 210 guests