Hawkwing Posted September 1, 2009 Share Posted September 1, 2009 (edited) If I wanted to have a for loop like so: for $i = $x to $y next and I wanted $x always be equal to $i, would I have to add $x = $i or would this work? $i = $x for $i = $i to $y next Edited September 1, 2009 by Hawkwing The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
wolf9228 Posted September 1, 2009 Share Posted September 1, 2009 If I wanted to have a for loop like so: for $i = $x to $y next and I wanted $x always be equal to $i, would I have to add $x = $i or would this work? $i = $x for $i = $i to $y next What do you want to do Write the full code of the process that you want to do صرح السماء كان هنا Link to comment Share on other sites More sharing options...
Hawkwing Posted September 1, 2009 Author Share Posted September 1, 2009 Well, I'm not actually writing a code. I don't have access to a computer with autoit right now, and I was just wondering if there was some sort of ByRef thing for a for loop. The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
Manjish Posted September 2, 2009 Share Posted September 2, 2009 If you want $x always be equal to $i then you'll have to write it as: $x=0 $y=10 for $i=$x to $y $x=$i MsgBox(4096,"",$x&" "&$i) Next [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
Belfigor Posted September 2, 2009 Share Posted September 2, 2009 $y=10 For $x=$0 to $y MsgBox(4096,"",$x&","&$i) Next Why dont just use code like this? [size="1"]My bear is so cute asleep in the closet, not even drinking vodka. My nuclear bomb name is Natasha.[/size] Link to comment Share on other sites More sharing options...
jvanegmond Posted September 2, 2009 Share Posted September 2, 2009 $y=10For $x=$0 to $yMsgBox(4096,"",$x&","&$i)NextWhy dont just use code like this?Because coding like that makes your app crash on a undefined variable error. github.com/jvanegmond Link to comment Share on other sites More sharing options...
WolfWorld Posted September 2, 2009 Share Posted September 2, 2009 $y=10For $x=$0 to $yMsgBox(4096,"",$x&","&$i)NextWhy dont just use code like this?Hello, where did the $i go? Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets! Link to comment Share on other sites More sharing options...
Manjish Posted September 2, 2009 Share Posted September 2, 2009 (edited) $y=10For $x=$0 to $yMsgBox(4096,"",$x&","&$i)NextWhy dont just use code like this?What's $0, my friend?? And where did $i come from suddenly in Msgbox? Edited September 2, 2009 by Manjish [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
WolfWorld Posted September 2, 2009 Share Posted September 2, 2009 (edited) What's $0, my friend?? And where did $i come from suddenly in Msgbox?Don't even bother, it's just a pure mess.Edit: grammar police Edited September 2, 2009 by WolfWorld Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets! Link to comment Share on other sites More sharing options...
jvanegmond Posted September 2, 2009 Share Posted September 2, 2009 All aboard the bandwagon. github.com/jvanegmond 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