Sign in to follow this  
Followers 0
Guest Garrick P.

Need a script to hit the S Key every 4 Minutes

6 posts in this topic

I have no experience whatsoever with AutoIT, just heard is was what i needed. I need a script to press the S key every 4 mins, non stop, untill I stop it. Is that hard? Any help is GREATLY appreaciated

Share this post


Link to post
Share on other sites



I have no experience whatsoever with AutoIT, just heard is was what i needed. I need a script to press the S key every 4 mins, non stop, untill I stop it. Is that hard? Any help is GREATLY appreaciated

Next time, this kind of request for help should really go in the "Version 3 support" forum and not the section for posting your own code.

To answer your question, yes, AutoIt can do what you need. To help you write this script, there is a helpfile, called AutoIt.chm, that will be placed into the directory where you installed AutoIt. You will need this to help you figure out how to use the proper functions.

Sections that you may want to look at include the Keyboard Control section, and the Process Managment section (you might find something about how to pause a script in that section.) If you need to learn a bit about how a script works, and some basic AutoIt information, you should read the Introduction, and both sections titled Using Autoit and Language Referance. The following section will also give you basic statements introduction, and it's called Keyword/Statement Referance

That should get you started.


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

$i = 0
Do
Sleep(24000)
Send("s")
Until $i = 1

That should work. :D

Share this post


Link to post
Share on other sites

Whoops wasn't logged in... here's the correct code:

$i = 0
Do
Sleep(240000)
Send("s")
Until $i = 1

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

While 1
  Send("S")
  Sleep(240000)
Wend

Edited by arsi

Share this post


Link to post
Share on other sites

Global $i = 0

HotKeySet ( "!s" , "_Stop")

While 1
   Sleep(240000)
   Send("s")
WEnd

Func _Stop()
   Exit
EndFunc

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  
Followers 0