Sign in to follow this  
Followers 0
ODell

MouseClick has high CPU usage

7 posts in this topic

I am doing about 50 mouseclicks in a row. When this part of my code is executed the cpu goes up to 47 percent. Here is an example:

MouseClick("left",573,449,"",50)

Sleep(10).

Is there any way to reduce the CPU usage as this script is ran in 10 RDP sessions and when 3 or hit this block of code at the same time the CPU is maxed out.

Share this post


Link to post
Share on other sites



Drop the slow mouse speed parameter (50) or greatly reduce the number. Moving the mouse slowly requires a timer loop inside the interpreter that is sucking up the cycles.

:(


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

yeah the 50 you have is in the Speed parameter, I think you want it in the clicks parameter so make it...

MouseClick("left",573,449,50)

instead.

Share this post


Link to post
Share on other sites

And of course that's not for a game bot...


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Thanks, that greatly improved the proble. And no it is not a gme bot, emegrgency room software, one big bitmap where I have to click certain word to test. Too much real work to play games.

Share this post


Link to post
Share on other sites

Sorry it looked like. We have a bit too much of those compared to real-life usage; kind of disgusting at times.

Good luck with your application.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Yeah, I read the post ever day and amazed at how many times a question is posted for a game bot. Thanks again for the help.

Share this post


Link to post
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
Sign in to follow this  
Followers 0