DemonAngel Posted January 13, 2006 Posted January 13, 2006 I am current generation multiple tabs and controls using for loops and arrays. for example. while 1 $msg = GuiGetMsg() Select Case $msg = $plustabbutton $tabcount = $tabcount + 1 AddTab($tabcount) EndSelect WEnd Func AddTab($tabcount) $tab = GUICtrlCreateTabitem ("Tab "&$tabcount) $date[$tabcount] = GuiCtrlCreateDate("Date", 170, 120, 130, 20, $DTS_SHORTDATEFORMAT) Endfunc Lets say the user clicks the plustabbutton 3 times. This leaves me with $date[1], $date[2] and $date[3]. What I want to know if how to create a case select that inclused the entire array. Select Case $msg = $date[*]; If you get what I meen. EndSelect bare in mind that Case $msg = $date[1] or $date[2] or $date[3] wont wort since you can end up with 99+ date array entries.
Nuffilein805 Posted January 13, 2006 Posted January 13, 2006 have you tried a for...next loop already? select for $i = 1 to $date[0] step 1 case $msg = $date[$i] ...;whatever next endselect this could work, but i haven't tried it yet my little chatmy little encryption toolmy little hidermy unsafe clickbot
DemonAngel Posted January 13, 2006 Author Posted January 13, 2006 When I try the above suggestion I get a "syntax error" any more ideas?
Developers Jos Posted January 13, 2006 Developers Posted January 13, 2006 (edited) Don't use the Select Case but just the for next loop. for $i = 1 to Ubound($date) If $msg = $date[$i] then ;whatever EndIf next Edited January 13, 2006 by JdeB 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.
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