superPuru Posted November 11, 2010 Share 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 Link to comment Share on other sites More sharing options...
BugFix Posted November 11, 2010 Share Posted November 11, 2010 You can store all handles in an array. So you can work with them in an loop. Best Regards BugFix Link to comment Share on other sites More sharing options...
somdcomputerguy Posted November 11, 2010 Share 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. Link to comment Share on other sites More sharing options...
BugFix Posted November 11, 2010 Share 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 Link to comment Share on other sites More sharing options...
somdcomputerguy Posted November 11, 2010 Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now