Hyflex Posted April 3, 2007 Share Posted April 3, 2007 Why cant i get a simple script to work.... HotKeySet("{END}", "Terminate") While 1 sleep(10000) MouseClick("left", 0, 9999999999, 0) WEnd Func Terminate() Exit 0 EndFunc Ive tryed that but not working.... i want HotKeySet("{END}", "Terminate") to close the program, that part works... but i want the mouse to click with the left button for infinate times really really fast, but to start the script i want the hotkey: HotKeySet("{HOME}", "SPScript") and i want to pause it if i press it again... So i load the prgram to start my script i press Home, to pause it i press Home again... to start it again i do home again... ect ect To close i use END Could someone tell me whats wrong, i even changed my script so it had a delay instead of my attempt of having to press the button... Link to comment Share on other sites More sharing options...
therks Posted April 4, 2007 Share Posted April 4, 2007 (edited) MouseClick("left", 0, 9999999999, 0) That is going to left click the mouse at X position of 0, and the Y position of 9999999999... you must have a very big monitor. *Edit: Here's your best bet. Have a look at the example for HotKeySet. I'm guessing you did that already because of your exiting function named Terminate, and since you don't appear to be able to code your way out of a paper bag, I'm gonna guess you didn't come up with that yourself. Now replace this: ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd ;;;;;;;;oÝ÷ ÙhØb±«¢+Øìììì ½ä½Áɽɴݽձ¼¡Éìììì)Q½±AÕÍ ¤)]¡¥±Ä(5½ÕÍ ±¥¬ Ìäí±ÐÌäì¤)]¹(ììììììoÝ÷ Ø Ý³razǺÚ"µÍÝÙ^TÙ] ][ÝÞÔUTÑ_I][ÝË ][ÝÕÙÙÛT]ÙI][ÝÊBÝÙ^TÙ] ][ÝÞÑTÐßI][ÝË ][ÝÕZ[]I][ÝÊoÝ÷ ØZ+¶¬y«¢+Ù!½Ñ-åMÐ ÅÕ½Ðíí!=5ôÅÕ½Ðì°ÅÕ½ÐíQ½±AÕÍÅÕ½Ðì¤)!½Ñ-åMÐ ÅÕ½Ðíí9ôÅÕ½Ðì°ÅÕ½ÐíQɵ¥¹ÑÅÕ½Ðì¤oÝ÷ Ù.q©ãºy-ë)Þ±«¢+Ù!½Ñ-åMÐ ÅÕ½Ðì¬ÌÌíÅÕ½Ðì°ÅÕ½ÐíM¡½Ý5ÍÍÅÕ½Ðì¤íM¡¥Ðµ±ÐµoÝ÷ Ù©Ýjëh×6Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc Now without testing, I believe that script will do exactly what you asked for. Edited April 4, 2007 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Hyflex Posted April 4, 2007 Author Share Posted April 4, 2007 Ahh Very Helpfull, but how do i change the speed of click so its really fast? Link to comment Share on other sites More sharing options...
therks Posted April 4, 2007 Share Posted April 4, 2007 That's not really fast already? Oh, there's an option that adjusts click speed... I guess you could try that. Add this line to the top of the entire script: Opt('MouseClickDelay', 1) Good luck. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Hyflex Posted April 4, 2007 Author Share Posted April 4, 2007 (edited) Just noticed error ;P ;Simple Fast Clicker Opt('MouseClickDelay', 1) HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") ;;;; Body of program would go here ;;;; Func TogglePause() While 1 SplashTextOn("","Starting the Clicking Process", 370, 22, 222 ,33,1 ,"system", "", "") MouseClick('left') SplashOff() WEnd EndFunc ;;;;;;; Func Terminate() Exit 0 EndFuncoÝ÷ Ø:²{p¢¹--j»ljw°¯z{kÉçZºÚ"µÍÔÚ[HÝÛXÚÙÜ ÌÎNÓ[ÝÙPÛXÚÑ[^IÌÎNËJBÛØ[ ÌÍÔ]ÙYÝÙ^TÙ] ][ÝÞÔUTÑ_I][ÝË ][ÝÕÙÙÛT]ÙI][ÝÊBÝÙ^TÙ] ][ÝÞÑTÐßI][ÝË ][ÝÕZ[]I][ÝÊBÎÎÎÈÙHÙÙÜ[HÛÝ[ÛÈHÎÎÎÂ[ÈÙÙÛT]ÙJ BÚ[HBÜ ÌÍÚHHHÈNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNBTÜÚ^Û ][ÝÉ][ÝË ][ÝÔÝ[ÈHÛXÚÚ[ÈØÙÜÉ][ÝËÍÌÌËH ][ÝÜÞÝ[I][ÝË ][ÝÉ][ÝË ][ÝÉ][ÝÊB[ÝÙPÛXÚÊ ÌÎNÛY ÌÎNÊBÜÚÙ B^Ñ[[[ÂÎÎÎÎÎÎÂ[ÈZ[]J B^][[ Edited April 4, 2007 by XxXGoD Link to comment Share on other sites More sharing options...
therks Posted April 4, 2007 Share Posted April 4, 2007 (edited) Why did you erase the TogglePause function? Perhaps that's why you're getting an error, because it doesn't exist.No, that's all wrong. You replaced stuff inside the TogglePause function, you were supposed to replace the part before it. Leave the TogglePause function EXACTLY like the example. Edited April 4, 2007 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Hyflex Posted April 4, 2007 Author Share Posted April 4, 2007 Erm where? all i have done is added a few lines in with that function... Link to comment Share on other sites More sharing options...
therks Posted April 4, 2007 Share Posted April 4, 2007 Here, since you can't seem to figure it out, I've done it for you. You're on your own from here though. Global $Paused HotKeySet("{HOME}", "TogglePause") HotKeySet("{END}", "Terminate") ;;;; Body of program would go here ;;;; TogglePause() While 1 MouseClick('left') WEnd ;;;;;;; Func TogglePause() SplashOff() $Paused = NOT $Paused While $Paused sleep(10) WEnd SplashTextOn("","Starting the Clicking Process", 370, 22, 222 ,33,1 ,"system", "", "") EndFunc Func Terminate() Exit EndFunc My AutoIt Stuff | My Github 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