UTA Posted December 19, 2009 Posted December 19, 2009 Hi everybody, I was wondering if it is possible to creat controls in a loop (dynamically) and afterwards to address them dynamically. Imagine I want to create a (dynamic) number of icons next to each other. Later (in the sourcecode) I would like to address them dynamically the same way. Something like the following (but that doesn't work): Creation... For $i=1 to $NumberIcons $Icon & $i = GUICtrlCreateIcon($i & ".ico",0, $i-1*$IconSize+2, 2, $IconSize, $IconSize) Next Address... For $i=1 to $NumberIcons GUICtrlSetImage($Icon & $i, $i & ".ico") Next Is that possible somehow with autoit? UTA
Developers Jos Posted December 19, 2009 Developers Posted December 19, 2009 sure, just use an array to store the control handles. jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
UTA Posted December 19, 2009 Author Posted December 19, 2009 Aaaarg... of course! Thanks Jos! Sometimes I don't see the wood for the trees... UTA
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