Jump to content

loop?


whatever
 Share

Recommended Posts

i want to make a very simple loop

it should first wait 30 seconds, then press the button P

i 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
WEnd

And what i want to do is just:

Loop this

Sleep(30000)

send("p")

forever

How 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?

Link to comment
Share on other sites

Beated by BigDod :lmao:

Loop forever could be:

While 1
Sleep(30000)
Send("p")
WEnd

Meaning of $i in script:

in the beginning you give $i a value of 0

in 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, EXIT

It is usefull to use variables in loops indeed ;) it's easier to read

Neo

Edited by NeoFoX

[center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]

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...