Jump to content

loop with GUICtrlRead


tbaror
 Share

Recommended Posts

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
Link to comment
Share on other sites

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() ]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...