Jump to content

Noob - Automatic ctrl+a


Recommended Posts

Hi everybody,

I would like to find a way to help me in a game. Actually, I would like that my computer does "ctrl+a" every 15sec until I decide to stop it.

actually that's it but I really have no clue with the software. I have just seen that I should probably do it with it.

If someone can help me to write the code, that will be so nice...

Thank you very much !

Link to comment
Share on other sites

  • Developers

Welcome to the forums. just an observation:

- you have posted in the old Version AutoIt2 forum. shouldn't that be the AutoIt3 forum ?

- Have you installed the software and looked at the helpfile that came with it ?

- Have you tried to search for your answer before posting because I think this must have been asked a zillion times before?

Moved to te correct forum :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Here you go. This will press control+a with a 15 second interval, to stop, press ESC.

HotKeySet("{ESC}", "Stop") ;script can be stopped by pressing ESC

Sleep(5000) ;wait some time before starting the control+a cycle, to allow the user to navigate to the correct window

While 1 ;repeat endlessly
  Send("^a") ;simluate control+a keypress
  Sleep(15000) ;wait 15 seconds
WEnd ;repeat

Func Stop() ;to allow the script to stop
  Exit ;same
EndFunc ;same
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...