Same issue with a number of UI element commands, but taking UIClick as an example, second variable passed is the name of the element... but there are many times when I can only know ahead of time a partial element name. For instance, I know there will be an element containing a certain word, but that will not be the entire name, and it keeps changing.
I get the concept of maybe getting the UIAccessibileList, looking for that piece of the string, and getting the rest of the element name, but I'm not really sure how to isolate that particular element's name vs the rest of the enormous string that returns from UIAccessibleList since I don't know where it will be on the list, or how long it will be.
Or, is there a much simpler way? I can't seem to get any variation on wildcards to work directly with UIClick or similar commands in order to just pass the partial element name.
UIClick with only partial element name
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: UIClick with only partial element name
If you are parsing UIAccessibleList surely the element name will match between start of line and = sign. So e.g. let's say you have several "Panel" objects but you don't know what they could be called - they may be Panel1, Panel2, etc you could do:
UIAccessibleList>Macro Scheduler 14,list
RegEx>(?m)(?<=^)*Panel.*?(?=\=),list,0,matches,nm,0
This would return an array of all element names that have the word "Panel" in them. If you want the value as well then change the expression to end at the end of the line instead of the equals sign.
UIAccessibleList>Macro Scheduler 14,list
RegEx>(?m)(?<=^)*Panel.*?(?=\=),list,0,matches,nm,0
This would return an array of all element names that have the word "Panel" in them. If you want the value as well then change the expression to end at the end of the line instead of the equals sign.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?