Jump to content

Recommended Posts

Posted

so i have been trying to make an a program which:

presses the space-bar every 22 miliseconds, i can do that But its really annoying when i change pages on crome, i have to stop the script then start it again.

while true
Send("{SPACE}")
sleep(25)
WEnd

now i want to just set F1 so it starts to press space every 22miliseconds then when i press it again (it can be F2 to stop) it will pause the script, and if i press it again it will start again and so on.... I cant do that can someone help, please im a noob.

  • Moderators
Posted

@jeremyroberts what is the end goal with pressing the spacebar so often? Sending keys is always going to be a little unreliable; there is more than likely a much better way to accomplish what you are after.

"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!

  • Moderators
Posted

It is awesome, I will agree with you there. But spamming a button pointlessly on the keyboard leads many to think you're either working at automating a game or trying to create a "joke" or "spoof" script - both of which are against our forum rules (I am sure you've take the time to read them, so it goes without saying that was not your intent).

If you are interested in showing your friends something that showcases the power of AutoIt, I suggest you look through our Examples forum. There are many scripts here that, in just a few lines, can show you and your friends what the language is capable of.

"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!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...