Jump to content

Counting Up in AutoIt


Recommended Posts

Hey everyone , I want to make a "While" or loop in Autoit where the program counts up numbers automatically in my notepad, starting from the number 5000.

So I want it to write this every 2 seconds automatically :

5001

2 secs

5002

2 secs 

5003

 

I don't really know how to do this without writing " send("5003") ", then "send("5004") " then "send(5005)"  every single time, any help would be greatly appreciated :D

Edited by jameelo25
Link to comment
Share on other sites

  • Moderators

@jameelo25 in short, something like this:

for $x = 5000 to 6000
    Send($x)
    Sleep(2000)
Next

Just realize that Send is unreliable - it doesn't care what window is active. If you have a specific window/program in mind, look at ControlSend in the help file.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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