use UIGetValue from elements found by UIAccessibleList

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Djek
Pro Scripter
Posts: 147
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

use UIGetValue from elements found by UIAccessibleList

Post by Djek » Sun Mar 30, 2014 1:46 pm

hi all,
i'm driving nuts over here, trying to collect data from some elements with UIGetValue

Image

See the picture: These are settings filtering the printer output.
see the red box: i like to know if "Specificatienr" is "1010"
and "Variant code" is 8399
and "Leveranciersnr" is 0005
etc etc

if i use
UIAccessibleList>{"Bewerken - "},Result
then Macro Sheduler comes up with all the possible elements in Result.
(i do not paste all info but only the relevant lines)

Code: Select all

                        = [30,288,403x180]
                           Hoofdelement= [35,306,390x152]
                            Of-verzameling= [35,306,390x152]
                             En-verzameling= [35,306,390x152]

                              Eenvoudig element= [118,306,281x22]
                               Eigenschap=Specificatienr. [118,306,95x21]
                               Operator=is [213,306,34x21]
                               Waarde-editor=1010 [247,306,125x21]

                              Eenvoudig element= [118,328,273x22]
                               Eigenschap=Variant code [118,328,87x21]
                               Operator=is [205,328,34x21]
                               Waarde-editor=8399 [239,328,125x21]

                              Eenvoudig element= [118,350,288x22]
                               Eigenschap=Leveranciersnr. [118,350,102x21]
                               Operator=is [220,350,34x21]
                               Waarde-editor=0005 [254,350,125x21]

                              Eenvoudig element= [118,372,247x22]
                               Eigenschap=Specificatienr. [118,372,95x21]
                               Operator=is [213,372,34x21]
                               Waarde-editor=1001 [247,372,91x21]

                              Eenvoudig element= [118,394,222x22]
                               Eigenschap=Versienr. [118,394,70x21]
                               Operator=is [188,394,34x21]
                               Waarde-editor=1.0 [222,394,91x21]

                              Eenvoudig element= [118,416,257x22]
                               Eigenschap=Artikelnr. [118,416,71x21]
                               Operator=is [189,416,34x21]
                               Waarde-editor=D0005 [223,416,125x21]

                              Knop verwijderen= [36,306,22x22]
                              Knop verwijderen= [36,328,22x22]
                              Knop verwijderen= [36,350,22x22]
                              Knop verwijderen= [36,372,22x22]
                              Knop verwijderen= [36,394,22x22]
                              Knop verwijderen= [36,416,22x22]
                              Knop toevoegen= [35,438,107x20]
                              Knopmenu toevoegen= [142,438,14x20]
                       = [30,304,403x0]
As you can see, Macro Sheduler perfectly can read the info i like to know,
so:
Eigenschap=Specificatienr. Waarde-editor=1010
Eigenschap=Variant code Waarde-editor=8399
etc

Now if i use
UIGetValue>{"Bewerken - "},{"Eigenschap"},waarde,positie
i get only the first element:
Eigenschap=Specificatienr. Waarde-editor=1010 (see the blue arrow)

Now the big question is;
- how do i syntax the UIGetValue to get data from the second en third and the rest of the elements?

Ok, i tried to look for arrays (seperated with | , as we can read in the helpfile)
but no go.

thanks for looking into this.
kind regards
Djek

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Mar 31, 2014 8:44 am

Hi,

I've just checked this out and there is a bug. Recursion is incorrectly stopping for UIGetValue and UIPos which should return ALL matches. The other functions (click/focus/select) can only act on one so have to assume the first match.

We'll get that fixed - hopefully today. In the mean time here's a simple workaround:

UIAccessibleList>Bewerken - ,elList
RegEx>(?<=Eigenschap=).*?(?= \[),elList,0,aValues,aValues_Count,0

This will give you an array called aValues containing all the values of the matching element.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Djek
Pro Scripter
Posts: 147
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

Post by Djek » Mon Mar 31, 2014 9:40 am

Thanks for the answer Marcus,

:D

i allready used UIAccessibleList> with the Separate> command as a workaround,
but I was wondering why UIGetValue did not function like i tought it should be.

kind regards,
Djek

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Mar 31, 2014 11:53 am

Now fixed in 14.1.02. Available from the usual place(s). Apologies and thanks for the report.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts