marko001 Posted October 21, 2010 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
Developers Jos Posted October 21, 2010 Developers 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.
marko001 Posted October 21, 2010 Author Posted October 21, 2010 Can you please make me an example? I'm a bit tard about it. Thanks a lot, mate. Marco
Developers Jos Posted October 21, 2010 Developers 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.
marko001 Posted October 21, 2010 Author 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!
Bert Posted October 21, 2010 Posted October 21, 2010 @Jos - Nice example. That should be put in the Wiki cookbook. The Vollatran project My blog: http://www.vollysinterestingshit.com/
Developers Jos Posted October 21, 2010 Developers 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.
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