Aru Posted May 3, 2010 Share Posted May 3, 2010 Alright, pretty simple issue here.. I'm making an autoclicker, but the MouseClick() function seems to have a lot of overhead. I've compared it to other autoclickers I've used, and they all stay at virtually no CPU usage no matter how fast I set them to. This script, on the other hand, uses up 25% of my CPU time. While True Sleep(15) MouseClick("left") WEnd Am I doing something wrong? There has to be some way. It should be using far less than 1%. Link to comment Share on other sites More sharing options...
Alek Posted May 3, 2010 Share Posted May 3, 2010 (edited) hmm, thats weirdit uses 11% cpu on my system but changing it from mouseclick to mousedown mouseup uses < 1% While True Sleep(15) MouseDown("Left") MouseUp("Left") WEndEdit: its due to MouseClickDelay and MouseClickDownDelay, changing them to 0 or 15+ makes the cpu usage drop. Edited May 3, 2010 by Alek [font="Impact"]Never fear, I is here.[/font] Link to comment Share on other sites More sharing options...
Aru Posted May 4, 2010 Author Share Posted May 4, 2010 Well I decided to just use MouseDown() and MouseUp() and insert my own delay between them via Sleep(1), so that the MouseClickDelay and MouseClickDownDelay options don't affect anything anyway xD Also, sleep() doesn't seem to suck up CPU time the way the internal timer of MouseClick() does.. so just splitting it up and doing the clicks manually with MouseDown() and MouseUp() and Sleep() is perfect... thank you very much :3 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