Automating legacy Windows-Applications

Hi,

I am currently trying to automate a rather intractable Windows-Application. I can identify many items but the selectors always look something like this:

wnd app=’****.exe’ ctrlname=‘n0’ />
wnd ctrlname=‘n4’ />
wnd ctrlname=‘n5’ />
wnd ctrlname=‘n29’ />

As you can guess, every time the application is restarted, the numbers change so the selectors don’t match any more, UIExplorer don’t help me any further here.

Some of the items cannot be identified at all, like labels and tables. So I was trying to use anchor base in conjunction with find Image to identify the label and the text field belonging to it but even that does not work (find Image finds an UIElement, but typeInto does not do anything).

Can you give me any hints on how to handle that kind of application?

Thanks and best regards
Sebastian

Not sure I understand, but did you try using a wildcard for the number that changes each time you run the App?

1 Like

Well, the problem is that each element has a selector with basically the same structure, so if I use wildcards for example like this:

wnd app=’.exe’ ctrlname=‘n’ />
wnd ctrlname=‘n
’ />
wnd ctrlname=‘n
’ />
wnd ctrlname=‘n
’ />

it will not match a single item but any.

Somehow all special character get filtered out here, how can I add wildcards?

use * as the wildcard text. Edit in the selector, for example:
Before


After

Yes, that’s exactly how I did it, but if all controls selectors basically consist of letter ‘n’ followed by 1 up to 3 digits, wildcards do not bring me any further, because they will match almost any element. I wanted to type an example in here but all kinds of code or special letters get filtered out by the forum???

In the meantime I played around with anchor base and find image and I managed to successfully identify some of the elements that were difficult to catch. So probably that’s the only way to go.

Is it always the same number of fields in the app? I have used tab key to navigate certain apps when the the fields are are always the same, but the selector cannot be identified.

That idea also came to my mind but I didn’t manage to properly address the send hotkey-activity within the application. And when the focus is on a certain element I would like to click or type text or get text, the activity cannot properly address the focused element. I guess I would have to use the application window as selector but somehow it wouldn’t work.

Without being able to see your app, cannot not help much more than this troubleshooting stuff…sorry. And you probably already tried the same stuff I would suggest. There was computer vision stuff which I have not used yet, maybe that is best to use on your app.

Doesn’t computer vision require a special license?

Using anchor base is actually not completely satisfying, as long as the field next to the anchor is enabled and contains content it works fine, but when the field is empty or disabled it tries to fetch data from the next enabled element and that can be far-off ;-(. But besides the direction of the anchor in relation to the searched item you cannot set limits for the valid scope.

Not sure, just saw a video on it and it seemed to be for Apps that do not have reliable selectors or accessing aps through a remote connection.