Jump to content
Sign in to follow this  
tetsunochin

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 !

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

sorry for the mistake about the old version...I loose my mind lol

Actually, I have installed the software but it's like a chinese paper for me :-D

Thank you both...I'll check the links and if I have problems, I'll let you know...

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...