suxxor 0 Report post Posted February 23, 2006 Hi, could somebody post a code snippet so what when i press a button "end" for example the mouse clicks every .10 seconds until I hit "end" again? thanks Share this post Link to post Share on other sites
Valuater 107 Report post Posted February 23, 2006 Welcome to Autoit ; Press Esc to terminate script, End to "Run" Global $Paused HotKeySet("{END}", "TogglePause") HotKeySet("{ESC}", "Terminate") ;;;; Body of program would go here;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused ToolTip('Script is "Running"',0,0) sleep(100) MouseClick("Left") WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Merry Christmas 8) Share this post Link to post Share on other sites
suxxor 0 Report post Posted February 23, 2006 thanks for helping, ill learn all i can from your script :] Share this post Link to post Share on other sites
suxxor 0 Report post Posted February 23, 2006 Q: What could I do to make it so that when I hit Esc it stops the function instead of terminating it? Then after I could start it again by pressing end again. Thanks <3 Share this post Link to post Share on other sites
pecloe 1 Report post Posted February 23, 2006 @merry christmas ? i'm in a time warp ! Share this post Link to post Share on other sites
Valuater 107 Report post Posted February 23, 2006 it does what you askedi press a button "end" for example the mouse clicks every .10 seconds until I hit "end" again?8) Share this post Link to post Share on other sites
pecloe 1 Report post Posted February 23, 2006 look at hotkeyset in the helpfile, pause. press {pause} pauses the script, {pause} resumes. Share this post Link to post Share on other sites
suxxor 0 Report post Posted February 23, 2006 nvm got it thanks ;] Share this post Link to post Share on other sites