whatever Posted November 23, 2006 Posted November 23, 2006 i want to make a very simple loopit should first wait 30 seconds, then press the button Pi looked at the helpfile about looping..and it was confusing..this is what it looks like:$i = 0 While $i <= 10 MsgBox(0, "Value of $i is:", $i) $i = $i + 1 WEndAnd what i want to do is just:Loop thisSleep(30000)send("p") foreverHow do i type this then?Whats the meaning of "$i" ? I mean i know its a variable..but how does it work? Are there any pages where i can learn more about variables? Do i have to make variables to create loops?
BigDod Posted November 23, 2006 Posted November 23, 2006 While 1 Sleep(30000) Send("p") WEnd Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
NeoFoX Posted November 23, 2006 Posted November 23, 2006 (edited) Beated by BigDod Loop forever could be:While 1 Sleep(30000) Send("p") WEndMeaning of $i in script:in the beginning you give $i a value of 0in the while statement you say: WHILE $i is not 10 give a nice msgbox...and everytime you get a msgbox.. $i will be rased with 1, and the script wil start over again.summary: $i=0, msgbox, $i=1, msgbox... $i=9, msgbox, $i=10, EXITIt is usefull to use variables in loops indeed it's easier to readNeo Edited November 23, 2006 by NeoFoX [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]
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