MasterRaistlin Posted May 30, 2006 Share Posted May 30, 2006 I've experimented with this but it still doesn't work so I'm wondering if it's even possible. Here's the rundown of what I want to do:(note..not exact code) $iIndex = 6 For $x = 1 to $iIndex $sTempSymbolInput = $SymbolInput & $x ; Wanting end result of $sTempSymbolInput to be $SymbolInput1 GuiCtrlSetData($sTempSymbolinput, $symArray[$x - 1]) Next Is it clear what I'm trying to do? Is this possible or is there another function I can call from within AutoIt? Link to comment Share on other sites More sharing options...
b8bboi Posted May 30, 2006 Share Posted May 30, 2006 GuiCtrlSetData takes a control handle, not just a name. You can try something like this. $iIndex = 6 For $x = 1 to $iIndex $sTempSymbolInput = $SymbolInput & $x ; Wanting end result of $sTempSymbolInput to be $SymbolInput1 $temp_ctrl = ControlGetHandle("Your Window Name", "", $sTempSymbolinput) GuiCtrlSetData($temp_ctrl, $symArray[$x - 1]) Next Link to comment Share on other sites More sharing options...
Valuater Posted May 30, 2006 Share Posted May 30, 2006 (edited) maybe.. not enough info because currently.. $sTempSymbolInput is not an Autoit known control that you can set the data to 8) little late... lol Edited May 30, 2006 by Valuater Link to comment Share on other sites More sharing options...
MasterRaistlin Posted May 30, 2006 Author Share Posted May 30, 2006 Sorry..I guess I should have been more specific..... $SymbolInput($x) are a bunch of different input boxes (so called SymbolInput1, SymbolInput2, etc) I have on my GUI and, at the time of running this function, would contain nothing. So what I want to do is, when the user starts this certain function, would load the data in sequence from $symArray and put it into the Input boxes for use in another part of the program (yes..I do need them to be displayed in the Input boxes for the user in this case) Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 31, 2006 Share Posted May 31, 2006 Sorry..I guess I should have been more specific.....$SymbolInput($x) are a bunch of different input boxes (so called SymbolInput1, SymbolInput2, etc) I have on my GUI and, at the time of running this function, would contain nothing. So what I want to do is, when the user starts this certain function, would load the data in sequence from $symArray and put it into the Input boxes for use in another part of the program (yes..I do need them to be displayed in the Input boxes for the user in this case)Why not keep those input boxes in turn in their own array: Instead of variable names with numbers, why not array indexes? I have a user management script that reads the list of users (don't know how many in advance), and then presents a gui to select them by check boxes for action. The list of users is an array, the list of ceckbox control IDs is a matching array where the index for the user matches the index for the control ID of that user's checkbox (can also be done with a single multi-dimensional array).When I started out in AuotIT, I ran quickly into situations I thought required "variable-named variables". But a re-think has always pointed me to arrays as a better solution. Any reason why it won't work for you? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
neogia Posted May 31, 2006 Share Posted May 31, 2006 (edited) Well, there's two ways to do it. The way I would do it, is:Dim $SymbolInput[10] For $i = 0 To 9 $SymbolInput[$i] = GUICtrlCreateInput(...) Next oÝ÷ Ù:&jGá +kƥDz'«Êjyæ§jºÚÊ%v)නÿ*h²+b¢{(}©e¶¢{k¢[.W¬²Ø^Ëky©ez÷§+)iÇ¢»(ëax*.Á©í¶z¨º±!ÊÞjبÊzØ^±©Â+aéz»·uçbØ^½ªâi¹^©kyÊ&éÝyÛaz|¨¹Æ§v(ëax%G+ºÚ"µÍÜ ÌÍÚHHHÈL ÌÍÝ[Þ[XÛ[]H][ ][ÝÔÞ[XÛ[] ][ÝÈ [È ÌÍÚJBÈÈÝYB^Happy hunting!Edit: @PsaltyDS: too quick for me! Edited May 31, 2006 by neogia [u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia 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