spiderous Posted April 17, 2007 Share Posted April 17, 2007 Can someone write a simple script that will make my mouse constantly left click and stop and start when I hit a key, Maybe my end key? I have not done this in a while and Would appreciate any help. Link to comment Share on other sites More sharing options...
spiderous Posted April 17, 2007 Author Share Posted April 17, 2007 (edited) I am reading the help file now trying to learn. My comprehension is poor and my english is worse. Edited April 17, 2007 by spiderous Link to comment Share on other sites More sharing options...
xcal Posted April 17, 2007 Share Posted April 17, 2007 I am reading the help file now trying to learn. My comprehention is poor and my english is worse.The most important thing is to try. Once you have a something that you think should work, and doesn't, post it and then ask for help.Btw, your english is great. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
spiderous Posted April 17, 2007 Author Share Posted April 17, 2007 I have this While 1 MouseClick(left) WEnd But I don't knew how to make pause button. Link to comment Share on other sites More sharing options...
Generator Posted April 17, 2007 Share Posted April 17, 2007 Well, I don't mind helping you cuz I have too much time on my hands. Here is a good example: $Boolean=False $Sleep=100 HotKeySet("{END}","Quit") HotKeySet("{F11}","Ac") HotKeySet("{NUMPADADD}","SleepMinus") HotKeySet("{NUMPADSUB}","SleepPlus") While 1 Sleep(1000) WEnd Func Ac() $Boolean=Not $Boolean While $Boolean=True MouseClick("left") Sleep($Sleep) WEnd EndFunc Func SleepPlus() $Sleep=$Sleep+50 If $Sleep>=1000 Then $Sleep=1000 EndIf EndFunc Func SleepMinus() $Sleep=$Sleep-50 If $Sleep<=10 Then $Sleep=10 EndIf EndFunc Link to comment Share on other sites More sharing options...
spiderous Posted April 17, 2007 Author Share Posted April 17, 2007 this script says " HotKeySet("{END}','Quit") Error: Unknown Function name. Link to comment Share on other sites More sharing options...
spiderous Posted April 17, 2007 Author Share Posted April 17, 2007 (edited) The only way I made the error go away is to remove the line of code, but now my code is like this and is not working. Here is my code. I just want the mouse to click superfast. $Sleep=100 HotKeySet("{NUMPADADD}","SleepMinus") HotKeySet("{NUMPADSUB}","SleepPlus") While 1 Sleep(1) WEnd Func Ac() $Boolean=Not $Boolean While $Boolean=True MouseClick("left") Sleep($Sleep) WEnd EndFunc Func SleepPlus() $Sleep=$Sleep+50 If $Sleep>=1000 Then $Sleep=1000 EndIf EndFunc Func SleepMinus() $Sleep=$Sleep-50 If $Sleep<=10 Then $Sleep=10 EndIf EndFunc Edited April 17, 2007 by spiderous Link to comment Share on other sites More sharing options...
spiderous Posted April 17, 2007 Author Share Posted April 17, 2007 Please help I try to read I am stuck. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted April 17, 2007 Share Posted April 17, 2007 HotKeySet("{END}','Quit") Notice how wen it is declaring the function Quit that it uses a ' then a " to close it. Thats a no no change the " to ' and add it back in. Link to comment Share on other sites More sharing options...
BrettF Posted April 17, 2007 Share Posted April 17, 2007 And It looks like to me that the function "Quit" is missing. Add this to the bottom of your code and see how it goes. Func Quit () Exit Endfunc Have fun learning Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Generator Posted April 17, 2007 Share Posted April 17, 2007 HotKeySet("{END}','Quit") Notice how wen it is declaring the function Quit that it uses a ' then a " to close it. Thats a no no change the " to ' and add it back in.What he said it was just syntax error. Link to comment Share on other sites More sharing options...
smashly Posted April 17, 2007 Share Posted April 17, 2007 Another obvious reason it fails is there is no Quit() function in the script ..... Link to comment Share on other sites More sharing options...
Generator Posted April 17, 2007 Share Posted April 17, 2007 Another obvious reason it fails is there is no Quit() function in the script .....Lol I forgot to put that in cuz I just copy off 1 of my script Anyways as they all said add these codes at the end Func Quit() Exit EndFunc Link to comment Share on other sites More sharing options...
spiderous Posted April 17, 2007 Author Share Posted April 17, 2007 so then a good code would be this? It starts paused and I can't unpause it. $Boolean=False $Sleep=100 HotKeySet("{END}','Quit") HotKeySet("{F11}','Ac") HotKeySet("{NUMPADADD}','SleepMinus") HotKeySet("{NUMPADSUB}','SleepPlus") While 1 Sleep(1000) WEnd Func Ac() $Boolean=Not $Boolean While $Boolean=True MouseClick("left") Sleep($Sleep) WEnd EndFunc Func SleepPlus() $Sleep=$Sleep+50 If $Sleep>=1000 Then $Sleep=1000 EndIf EndFunc Func SleepMinus() $Sleep=$Sleep-50 If $Sleep<=10 Then $Sleep=10 EndIf EndFunc Func Quit () Exit Endfunc Link to comment Share on other sites More sharing options...
Apzo Posted April 17, 2007 Share Posted April 17, 2007 (edited) Just replace HotKeySet("{F11}','Ac") by HotKeySet("{F11}','Ac') and it should be good Edited April 17, 2007 by Apzo All the pop3 functions.Rsync your files on your USB key (or anywhere else) Link to comment Share on other sites More sharing options...
Generator Posted April 17, 2007 Share Posted April 17, 2007 Full working 1 is this. $Boolean=False $Sleep=100 HotKeySet("{END}","Quit") HotKeySet("{F11}","Ac") HotKeySet("{NUMPADADD}","SleepMinus") HotKeySet("{NUMPADSUB}","SleepPlus") While 1 Sleep(1000) WEnd Func Ac() $Boolean=Not $Boolean While $Boolean=True MouseClick("left") Sleep($Sleep) WEnd EndFunc Func SleepPlus() $Sleep=$Sleep+50 If $Sleep>=1000 Then $Sleep=1000 EndIf EndFunc Func SleepMinus() $Sleep=$Sleep-50 If $Sleep<=10 Then $Sleep=10 EndIf EndFunc Func Quit () Exit Endfunc So you hit F11 to start/pause AC, NumpadAdd to speed up, NumpadSub to slow down, End key to exit. 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