Sign in to follow this  
Followers 0
tbaror

loop with GUICtrlRead

2 posts in this topic

Hello,

i have a script that have 8 inputbox

i would like to put into a loop the inputbox variable reading value entered

i thought its doable with Eval like in the code below but i don't find the right way to do it.

please advice

thanks

For $k = 1 to 8
        
        $yu = String("$Thread"& $k)
        $S = GUICtrlRead(Eval($yu))
        MsgBox(16,"",$S)
        If $S <> "" Then 
        
        $S = $S & ","
        EndIf
        Next

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

For $k = 1 to 8
    $S = GUICtrlRead(Eval("Thread" & $k))
    MsgBox(16,"",$S)
    If $S <> "" Then  $S = $S & ","
Next

When you use Eval(), you don't need (and can't add) the $ in front of the variable name. Basically,

"$Thread"& $k

needs to be changed to

"Thread" & $k
Edited by -Ultima-

[ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ]

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