serialzs Posted December 10, 2005 Posted December 10, 2005 (edited) @all i have a autoit program problem. i cant get how to work it right Please help me here's my prob.. GUICtrlCreateIcon (@ScriptDir & $icon1,-1, 10, $1st) $1 = GuiCtrlCreateCheckbox($progname1, 55, $1a, -1, -1) GUICtrlCreateIcon (@ScriptDir & $icon2,0, 10, $2nd) $2 = GuiCtrlCreateCheckbox($progname2, 55, $2a, -1, -1) GUICtrlCreateIcon (@ScriptDir & $icon3,-1, 10, $3rd) $3 = GuiCtrlCreateCheckbox($progname3, 55, $3a, -1, -1) GUICtrlCreateIcon (@ScriptDir & $icon5,-1, 10, $4th) $5 = GuiCtrlCreateCheckbox($progname5, 55, $4a, -1, -1) GUICtrlCreateIcon (@ScriptDir & $icon4,-1, 10, $5th) $4 = GuiCtrlCreateCheckbox($progname4, 55, $5a, -1, -1) For $i = 5 to 1 Step -1 If GUICtrlRead("$" $i) = 1 then RunWait(@ScriptDir & $icon1) EndIf Next i use FOR command instead of IF command because it's a Long Script if i use it. My problem is GUICtrlRead("$" $i) doesnt work.. anyone know a solution? thanks in advance... -=[serialzs]=- Edited December 10, 2005 by serialzs
Developers Jos Posted December 10, 2005 Developers Posted December 10, 2005 (edited) try something like: Dim $h_i[6] GUICtrlCreateIcon (@ScriptDir & $icon1,-1, 10, $1st) $h_i[1] = GuiCtrlCreateCheckbox($progname1, 55, $1a, -1, -1) GUICtrlCreateIcon (@ScriptDir & $icon2,0, 10, $2nd) $h_i[2] = GuiCtrlCreateCheckbox($progname2, 55, $2a, -1, -1) GUICtrlCreateIcon (@ScriptDir & $icon3,-1, 10, $3rd) $h_i[3] = GuiCtrlCreateCheckbox($progname3, 55, $3a, -1, -1) GUICtrlCreateIcon (@ScriptDir & $icon5,-1, 10, $4th) $h_i[5] = GuiCtrlCreateCheckbox($progname5, 55, $4a, -1, -1) GUICtrlCreateIcon (@ScriptDir & $icon4,-1, 10, $5th) $h_i[4] = GuiCtrlCreateCheckbox($progname4, 55, $5a, -1, -1) For $i = 5 to 1 Step -1 If GUICtrlRead($h_i[$i]) = 1 then RunWait(@ScriptDir & $icon1) EndIf Next Edited December 10, 2005 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.
seandisanti Posted December 12, 2005 Posted December 12, 2005 @all i have a autoit program problem. i cant get how to work it right Please help me here's my prob.. i use FOR command instead of IF command because it's a Long Script if i use it. My problem is GUICtrlRead("$" $i) doesnt work.. anyone know a solution? thanks in advance... -=[serialzs]=-GUICtrlRead("$" $i) that isn't a valid concatenation... toss in a "&" between the literal string and variable name
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