Jump to content

From boxlist get name of items

Recommended Posts

Hello there

The scenario is: 

Go to list select the first one, get the name of that selection check if value is less then 0.4

if true go ferder till you get till number above 0.4. 

the code in the example of this link https://www.autoitscript.com/autoit3/docs/functions/GUICtrlRead.htm
I can see that it works, but when you make it on your own the gui, but I already have the application and I tried to find it with that tool, but no luck.

This is code that I have:

$micro = WinWait("[CLASS:TCheckListBox]", "", 10)
ControlClick($micro, "", "[CLASS:TCheckListBox; INSTANCE:1]", "left", 1, 12, 14)

//here I click on the box it self but on the first item.
//but now I want to get all the items to see what is the content
//and depending on the value select it or not.
MsgBox(0, "Selected listbox entry", GUICtrlRead(459810) //I tried with id but nothing :(


So any help would be great to understand how to get from list items.

thank you

Share this post

Link to post
Share on other sites

Ok here what better explanation:

In the attachment you see one list with datas.

It is the list where you can click on it and it will be highlighted.
what I want is to highlight them all bellow 0.4

This is the info of that listbox:

>>>> Control <<<<
Class:  TStringGrid
Instance:   1
ClassnameNN:    TStringGrid1
Advanced (Class):   [CLASS:TStringGrid; INSTANCE:1]
ID: 1901922
Position:   6, 321
Size:   371, 388
ControlClick Coords:    202, 52
Style:  0x54A10000
ExStyle:    0x00000000
Handle: 0x001D0562

To select first 15 is accomplished like this: 

$list = WinWait("[CLASS:TFormEtalon2; INSTANCE:1]", "", 10)
ControlClick($list, "", "[CLASS:TStringGrid; INSTANCE:1]", "left", 1, 345, 65)
ControlSend($list, "", "[CLASS:TStringGrid; INSTANCE:1]", "{SHIFTDOWN} {DOWN 10} {SHIFTUP}")

so I get first 10 things, but I would like to get also the number and name from list and not to say lets tyake first 10, but to check if number is bellow 0.4 select it otherwise stop.

Is this possible?

Screen Shot 2017-06-05 at 10.05.02 PM.png

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...