Jump to content

MouseClick CPU usage


Recommended Posts

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

hmm, thats weird

it uses 11% cpu on my system but changing it from mouseclick to mousedown mouseup uses < 1% :idea:

While True
    Sleep(15)
    MouseDown("Left")
    MouseUp("Left")
WEnd

Edit: its due to MouseClickDelay and MouseClickDownDelay, changing them to 0 or 15+ makes the cpu usage drop.

Edited by Alek

[font="Impact"]Never fear, I is here.[/font]

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...