Sign in to follow this  
Followers 0
serialzs

FOR LOOP with GUI

3 posts in this topic

#1 ·  Posted (edited)

@all

i have a autoit program problem. i cant get how to work it right :P

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.:lmao:

My problem is GUICtrlRead("$" $i) doesnt work..

anyone know a solution?

thanks in advance... :(

-=[serialzs]=-

Edited by serialzs

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

@all

i have a autoit program problem. i cant get how to work it right :P

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.:lmao:

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


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0