karman Posted April 10, 2011 Share Posted April 10, 2011 Hello I have some basic scripts that run 24/7. One of them simply checks, once per second, if a process is running. I'm using ProcessExists( "processname.exe") to check it. Of course, this uses 0% cpu normally. But after playing RIFT (www.riftgame.com), the ProcessExists() function causes the script to use up to 5% CPU. I tried compiling a new script with this code While 1 If ProcessExists( "dummy.exe" ) then exit Sleep( 1000 ) wend And it uses around 5% cpu. This is mildly annoying. Im wondering if anyone has any idea what Rift game is possibly doing that is causing this? It works fine after rebooting but i dont feel like doing that everytime after playing a little Rift. Appreciate any help or ideas on things I can try. Link to comment Share on other sites More sharing options...
GEOSoft Posted April 10, 2011 Share Posted April 10, 2011 http://www.autoitscript.com/forum/forum-2/announcement-12-game-bots-and-automation/ George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
karman Posted April 10, 2011 Author Share Posted April 10, 2011 http://www.autoitscript.com/forum/forum-2/announcement-12-game-bots-and-automation/I'm not discussing game automation. I'm wondering why/how ProcessExists starts using more cpu, what can be the cause, etc. I'm not using Autoit to automate any game. Link to comment Share on other sites More sharing options...
bogQ Posted April 10, 2011 Share Posted April 10, 2011 ProcessSetPriority TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.  Link to comment Share on other sites More sharing options...
karman Posted April 10, 2011 Author Share Posted April 10, 2011 ProcessSetPriorityThanks but thats not the issue here. The priority never changes and I dont think the simple script i posted should use 5% cpu no matter what the priority is. Link to comment Share on other sites More sharing options...
bogQ Posted April 10, 2011 Share Posted April 10, 2011 If your closing the game normal thing is that cpu usage go like hell until win cleanup memory of used files that the game use etc etc... So it's normal to have some programs under the same priority battle for the cpu usage so that they can do their job. I did post you that command because i`m suggesting you to try to lover priority of the process to see if there is any difference. TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.  Link to comment Share on other sites More sharing options...
karman Posted April 10, 2011 Author Share Posted April 10, 2011 Sure, but I haven't played in a couple of hours, and this simple script still uses ~5% CPU, when it normally should use 0%. While 1 If ProcessExists( "dummy.exe" ) then exit Sleep( 1000 ) wend Rebooting the comp fixes it, then the script uses 0% as it should. It starts using ~5% again after i have played Rift. I find it very weird.. im really wondering what could be the cause. Link to comment Share on other sites More sharing options...
bogQ Posted April 10, 2011 Share Posted April 10, 2011 w8, rebooting the comp? Restarting the script do not fix it? The only thing that i can ask you is how many memory do you have on that comp and whats your memory usage when you play that game, your cpu spec. If you have 1GB and when you play the game, memory usage goes more that 1GB than i can understand that only restarting comp can help (low virtual memory problem) and something like that can reflect to CPU usage on some win processes where only restart can help. I hardly think this is autoit related question, maby its AVP or slow comp problem or OS problem. Never the less i maybe don't know what im talking about and you should wait for someone other to give his opinion TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.  Link to comment Share on other sites More sharing options...
karman Posted April 10, 2011 Author Share Posted April 10, 2011 w8, rebooting the comp? Restarting the script do not fix it?The only thing that i can ask you is how many memory do you have on that comp and whats your memory usage when you play that game, your cpu spec.If you have 1GB and when you play the game, memory usage goes more that 1GB than i can understand that only restarting comp can help (low virtual memory problem) and something like that can reflect to CPU usage on some win processes where only restart can help.I hardly think this is autoit related question, maby its AVP or slow comp problem or OS problem.Never the less i maybe don't know what im talking about and you should wait for someone other to give his opinion Restarting the script does not fix it.I have 8 GB ram, I have never been above 40% usage (even when playing Rift, etc)It really confuses me why ProcessExists suddenly causes cpu to jump, in such a simple script. Maybe the game adjusts some Privileges/security related stuff, tbh i have no idea. Maybe an autoit developer can give some idea why ProcessExists would use much cpu. Link to comment Share on other sites More sharing options...
GEOSoft Posted April 10, 2011 Share Posted April 10, 2011 Play rift without the script and see what happens with CPU usage. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
karman Posted April 10, 2011 Author Share Posted April 10, 2011 (edited) Play rift without the script and see what happens with CPU usage.I play Rift > Close it > start up my the simple test script i posted here, and it uses up to 5% cpu, only a reboot fixes it from what ive tried so farEDIT:Ive noticed that ProcessExists() causes a LOT of "Page faults", if its good or bad i dont know. Maybe there is some error in the autoit core? Or maybe its normal. :-) Edited April 10, 2011 by karman 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