HelpThisNewbie Posted May 20, 2010 Posted May 20, 2010 Hey, I'm new at this and tried searching, but really clueless. I need to make a function that sends Ctrl + x 100 times everytime I press the F9 key. Any help is appreciated, thanks.
Tvern Posted May 20, 2010 Posted May 20, 2010 Here is an example: HotKeySet("{F9}","_Spam") While 1 Sleep(100) WEnd Func _Spam() Send("^{x 100}") EndFunc Out of curiosity. What in earth is this script good for?
HelpThisNewbie Posted May 20, 2010 Author Posted May 20, 2010 (edited) OK, won't let me edit my original post, but I also want the script to run until I press another button, F7. Just an easier way to cheat in a game, lol. Saves me some time Damn that was a fast reply, thanks. Edited May 20, 2010 by HelpThisNewbie
Tvern Posted May 20, 2010 Posted May 20, 2010 Ok you should be able to do so if you take the previous script as an example: HotKeySet("{F9}","_Spam") ;this makes F9 run the function _Spam ;set a hotkey here to run function _Exit While 1 ;this just lets the script do nothing untill a hotkey is pressed. Leave it as is. Sleep(100) WEnd Func _Spam() ;this is the function that runs when F9 is pressed. use the example to create a function called _Exit Send("^{x 100}") ;this is what the function does. Your new function should execute the command "Exit" EndFunc
niubbone Posted May 20, 2010 Posted May 20, 2010 Look in the guide for: _IsPressed and ExitLoop This may be of help in your problem with the F7 key toggle.
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