Sign in to follow this  
Followers 0
superPuru

finding labels by text

5 posts in this topic

Sorry, no code included, but would like to know if following is possible with AutoIt (couldn't find anything similiar from the forum -> meaning there is propably something fundamentally wrong with my idea :graduated: )

- if I have multiple controls (in this case labels) in my GUI, is it possible to loop through them and depending on the value of "text" field do something, e.g. change its background? I would like to avoid hardcoding all the handles of the controls, because there will be too many of them in my GUI, 100+...

thanks in advance,

Puru

Share this post


Link to post
Share on other sites



You can store all handles in an array. So you can work with them in an loop.


Best Regards BugFix  

Share this post


Link to post
Share on other sites

..the value of "text" field..

ControlGetText

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

What sense make that by own controls? Storing ID + Ctrl-text in an array and all is fine. :graduated:

Btw: You can get text from labels with GuiCtrlRead().


Best Regards BugFix  

Share this post


Link to post
Share on other sites

Oh yeah, I misread. Of course GUICtrlRead to get the 'value'. I have recently used ControlGetText to determine the 'state' of a control, so it's still stuck in my mind..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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
Sign in to follow this  
Followers 0