HelpThisNewbie 0 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. Share this post Link to post Share on other sites
Tvern 11 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? Share this post Link to post Share on other sites
HelpThisNewbie 0 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 Share this post Link to post Share on other sites
Tvern 11 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 Share this post Link to post Share on other sites
niubbone 0 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. Share this post Link to post Share on other sites