Jump to content

Press F6 every 3seconds


Recommended Posts

I need a script that press f6 every 3 seconds (if you couldnt guess from the title)

This is what I have

; press F6 every 3 seconds
 HotKeySet("^!\", "MyExit")
Sleep (3000)
Send ( "{F6}")
Sleep (3000)
Send ( "{F6}")
;goes on like this for awhile
 Func MyExit()
    Exit
EndFunc

But that doesnt work, it press F6 every 40 seconds or so.

Link to comment
Share on other sites

40 seconds? are you sure? Sleep(3000) should sleep for 3 seconds.. try this, may help:

$times = 5; replace 5 with however many times you want to sleep 6 secnods and send F6
For $i = 1 to $times
Sleep(6000);sleep 6 seconds..
Send ( "{F6}"); sends the keystroke, F6
Next
;rest of script here

should work..

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