marko001 Posted October 21, 2010 Share Posted October 21, 2010 Hi all,given this function:func _createInput() $Alto = 150 $Sinistra = 176 $delta = 0 $multiplier = 0 global $a,$s,$t for $t = 1 to 20 for $a = 1 to 14 Step 1 Assign("s",$t & "_" & $a) assign($s,GUICtrlCreateInput("",$Sinistra +$delta*$multiplier, $Alto,50,21,$ES_READONLY)) $delta = 55 $multiplier = $multiplier+1 Next $alto = $alto +25 $delta = 0 $multiplier = 0 Next EndFunc _createInput()It creates me in the form all the input boxes i need.How can i now GUICTRLSETDATA to every input? if the correct expression is guictrlsetdata(IDcontrol,data) where do I get the exact control id?Thanks,Marco Link to comment Share on other sites More sharing options...
Developers Jos Posted October 21, 2010 Developers Share Posted October 21, 2010 (edited) Avoid using Assign and simply use an Array to hold the Inputcontrol handles which then makes it simple to read them or write to them. Jos Edited October 21, 2010 by 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. Link to comment Share on other sites More sharing options...
marko001 Posted October 21, 2010 Author Share Posted October 21, 2010 Can you please make me an example? I'm a bit tard about it. Thanks a lot, mate. Marco Link to comment Share on other sites More sharing options...
Developers Jos Posted October 21, 2010 Developers Share Posted October 21, 2010 (edited) Can you please make me an example? I'm a bit tard about it. Thanks a lot, mate. Marco this code is filling the array... just use similar logic with the other GUI functions: Dim $INputHND[21][15] Func _createInput() $Alto = 150 $Sinistra = 176 $delta = 0 $multiplier = 0 Global $a, $s, $t For $t = 1 To 20 For $a = 1 To 14 $INputHND[$t][$a] = GUICtrlCreateInput("", $Sinistra + $delta * $multiplier, $Alto, 50, 21, $ES_READONLY) $delta = 55 $multiplier = $multiplier + 1 Next $Alto = $Alto + 25 $delta = 0 $multiplier = 0 Next EndFunc ;==>_createInput _createInput() Edited October 21, 2010 by Jos fixed code 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. Link to comment Share on other sites More sharing options...
marko001 Posted October 21, 2010 Author Share Posted October 21, 2010 Func _createInput() $Alto = 150 $Sinistra = 176 $delta = 0 $multiplier = 0 Global $a, $s, $t For $t = 1 To 20 For $a = 1 To 14 $INputHND[$t][$a] = GUICtrlCreateInput("", $Sinistra + $delta * $multiplier, $Alto, 50, 21, $ES_READONLY) $delta = 55 $multiplier = $multiplier + 1 Next $Alto = $Alto + 25 $delta = 0 $multiplier = 0 Next EndFunc ;==>_createInput _createInput() This is the correct one, you missed a [$a] Thanks a lot, mate! Link to comment Share on other sites More sharing options...
Bert Posted October 21, 2010 Share Posted October 21, 2010 @Jos - Nice example. That should be put in the Wiki cookbook. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Developers Jos Posted October 21, 2010 Developers Share Posted October 21, 2010 @Jos - Nice example. That should be put in the Wiki cookbook.I have used a "simpler" example in SciTEConfig.au3 in the Tab where you can set the Color settings. 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. 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