GarGar Posted April 4, 2010 Share Posted April 4, 2010 I'm trying to make a macro that will spam the 1 key as long as I'm holding it down (as in repeatedly press and release until I release the hotkey.) But what it does is do a loop of the hotkey triggering itself which does absolutely nothing. I'm wondering if there's a way to work around this somehow? Another example is if I'm trying to make the hotkey "h" send the string "hello", if I do this it inputs 'ello' and triggers itself, which inputs 'ello' again and continues until I terminate it. Here's the code I'm working with Global $Paused HotKeySet("{END}", "Terminate") HotKeySet("1", "one") While 1 WEnd Func Terminate() Exit 0 EndFunc Func one() While 1 Send("1") sleep(2) WEnd EndFunc I'll try to be reasonable, I haven't worked with AutoIt much. Link to comment Share on other sites More sharing options...
GarGar Posted April 4, 2010 Author Share Posted April 4, 2010 Oops, first try led me to a 404 so I tried again, but it submitted 2 topics, can someone delete/lock please? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now