Dizzydbd Posted April 14, 2008 Share Posted April 14, 2008 (edited) How can i do smth like this (hard for me to explain but i'll try; it is possible in C with %i% or smth like that) For $i = 1 to 4 Msgbox(0,"test",Guictrlread($Input & $i)) $i+=1 next It's like this in C# Console.WriteLine("Values: {0}, {1}", val1.Value, val2.Value) Edited April 14, 2008 by Dizzydbd Link to comment Share on other sites More sharing options...
Monamo Posted April 14, 2008 Share Posted April 14, 2008 (edited) How can i do smth like this (hard for me to explain but i'll try; it is possible in C with %i% or smth like that) For $i = 1 to 4 Msgbox(0,"test",Guictrlread($Input & $i)) $i+=1 next It's like this in C# Console.WriteLine("Values: {0}, {1}", val1.Value, val2.Value)Untested: For $i = 1 To 4 $sActiveInput = Eval("input" & $i) If $sActiveInput <> "" Then MsgBox(0, "test", GUICtrlRead($sActiveInput)) EndIf Next Also, there's no need to do the $i+=1 in your For...Next loop unless you're intending to skip every other result. Ex: First run $i = 1 MsgBox... yada yada Increment $i ($i = 2) Second run, For...Next increments, changing $i to 3, so $input2 is skipped... Edit: in explaining about "skipping," I, uh, skipped entering the word itself Edited April 14, 2008 by Monamo - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] Link to comment Share on other sites More sharing options...
Dizzydbd Posted April 16, 2008 Author Share Posted April 16, 2008 Also, there's no need to do the $i+=1 in your For...Next loop unless you're intending to skip every other result.No freaking idea why i did added that ^^. Thinking at while mb ...Thank your for your answer. Link to comment Share on other sites More sharing options...
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