Jump to content

Simple Key Repeater


Recommended Posts

Look up HotKeySet in the helpfile.

HotKeySet ("{SPACE}", "Lots_Of_Spaces")

While 1

Sleep (100)

WEnd

Func Lots_Of_Spaces()

HotKeySet ("{SPACE}")

Send ("{SPACE}")

HotKeySet ("{SPACE}", "Lots_Of_Spaces")

EndFunc

That sends 1 extra space for every space you press (hold it down to do more, or put that in a loop).

Link to comment
Share on other sites

The space key that the human presses is "absorbed" by HotKeySet --- so the function must send at least 2 spaces to do what you wanted. Try this:

HotKeySet("{SPACE}", "Lots_Of_Spaces")

While 1
    Sleep(100)
WEnd

Func Lots_Of_Spaces()
    HotKeySet("{SPACE}")
    Send("{SPACE 2}")
    HotKeySet("{SPACE}", "Lots_Of_Spaces")
EndFunc  ;==>Lots_Of_Spaces
You can change the 2 in this line Send("{SPACE 2}") to increase the number of spaces that will be sent each time you press the space bar.

Welcome to the forums JamieRollins. Enjoy greenmachine's code with my minor tweak...

[size="1"][font="Arial"].[u].[/u][/font][/size]

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