BritishT 0 Posted July 26, 2007 Hey people, i'm trying to make a script where i press a button and it does the left mouse click every so often at fast intervals untill i press that button again to make it stop. so far i ahve this While 1 MouseClick("left") Sleep(150) WEnd can you help me put in a hotkey or whatever it is called? thx for the help . Share this post Link to post Share on other sites
tAKTelapis 1 Posted July 26, 2007 I am sorry about your Weight. As for the hotkeys: Have a look at HotKeySet() in the helpfile. it gives you everything you want, may need slighy modification, but i am sure you can see what is needed (hint: Swap out the While ... WEnd statements, so that when the script is "paused" it is actually clicking and when it is "un-paused" it is not clicking.. this way, you will have to hit the hotkey to get the clicking to start) ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d ;;;; Body of program would go here ;;;; While 1 MouseClick("left") Sleep(150) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc Share this post Link to post Share on other sites
BritishT 0 Posted July 26, 2007 haha, thanks for your sympathy. Thank you so very much for the help Share this post Link to post Share on other sites