Hef Posted December 29, 2008 Posted December 29, 2008 I have a script for a auto clicker and I made one for a menu. The menu has a start button stop button and it has exit and help on the Menu item. If someone could tell me how to make is so they are together and when you press "Start" the auto clicker starts, and when you press "Stop" it stops. I will post the scripts if they are needed to combine them.
exodius Posted December 30, 2008 Posted December 30, 2008 Welcome to the forums! Yes, you should always post your example script(s), if you have a question but don't have an example script, you should always make one so everyone else knows what exactly it is that you're asking.
Debit Posted December 30, 2008 Posted December 30, 2008 (edited) I have a script for a auto clicker and I made one for a menu. The menu has a start button stop button and it has exit and help on the Menu item. If someone could tell me how to make is so they are together and when you press "Start" the auto clicker starts, and when you press "Stop" it stops. I will post the scripts if they are needed to combine them. What about a pause hotkey? ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused, $counter = 0 HotKeySet("{F1}", "TogglePause");This will Toggle the pause on and off starting and stopping the script. HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; While 1 $counter +=1 ToolTip('Script is "Running"',0,0, $counter, 1) Sleep(700) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0, $counter, 1) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","Your welcome!") EndFunc I hope this helps. Edited December 30, 2008 by Debit
Hef Posted December 31, 2008 Author Posted December 31, 2008 What about a pause hotkey? ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused, $counter = 0 HotKeySet("{F1}", "TogglePause");This will Toggle the pause on and off starting and stopping the script. HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; While 1 $counter +=1 ToolTip('Script is "Running"',0,0, $counter, 1) Sleep(700) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0, $counter, 1) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","Your welcome!") EndFunc I hope this helps. I'll try that, thanks.
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