suxxor Posted February 23, 2006 Share 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 Link to comment Share on other sites More sharing options...
Valuater Posted February 23, 2006 Share 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) Link to comment Share on other sites More sharing options...
suxxor Posted February 23, 2006 Author Share Posted February 23, 2006 thanks for helping, ill learn all i can from your script :] Link to comment Share on other sites More sharing options...
suxxor Posted February 23, 2006 Author Share 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 Link to comment Share on other sites More sharing options...
pecloe Posted February 23, 2006 Share Posted February 23, 2006 @merry christmas ? i'm in a time warp ! Link to comment Share on other sites More sharing options...
Valuater Posted February 23, 2006 Share 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) Link to comment Share on other sites More sharing options...
pecloe Posted February 23, 2006 Share Posted February 23, 2006 look at hotkeyset in the helpfile, pause. press {pause} pauses the script, {pause} resumes. Link to comment Share on other sites More sharing options...
suxxor Posted February 23, 2006 Author Share Posted February 23, 2006 nvm got it thanks ;] Link to comment Share on other sites More sharing options...
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