ODell Posted April 1, 2010 Share Posted April 1, 2010 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. Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 1, 2010 Share Posted April 1, 2010 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 Link to comment Share on other sites More sharing options...
ShawnW Posted April 1, 2010 Share Posted April 1, 2010 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. Link to comment Share on other sites More sharing options...
jchd Posted April 1, 2010 Share Posted April 1, 2010 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 hereRegExp tutorial: enough to get startedPCRE 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) Link to comment Share on other sites More sharing options...
ODell Posted April 2, 2010 Author Share Posted April 2, 2010 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. Link to comment Share on other sites More sharing options...
jchd Posted April 2, 2010 Share Posted April 2, 2010 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 hereRegExp tutorial: enough to get startedPCRE 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) Link to comment Share on other sites More sharing options...
ODell Posted April 3, 2010 Author Share Posted April 3, 2010 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. 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