superPuru 0 Posted November 11, 2010 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 ) - 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
BugFix 43 Posted November 11, 2010 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
somdcomputerguy 103 Posted November 11, 2010 ..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
BugFix 43 Posted November 11, 2010 ControlGetTextWhat sense make that by own controls? Storing ID + Ctrl-text in an array and all is fine. Btw: You can get text from labels with GuiCtrlRead(). Best Regards BugFix Share this post Link to post Share on other sites
somdcomputerguy 103 Posted November 11, 2010 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