trademaid Posted October 10, 2009 Share Posted October 10, 2009 i want to play a wave file when the cpu useage of my quad core drops below x. How do i detect the cpu useage? Link to comment Share on other sites More sharing options...
furrycow Posted October 10, 2009 Share Posted October 10, 2009 i want to play a wave file when the cpu useage of my quad core drops below x.How do i detect the cpu useage?Although i personally have never used them, i'm sure they work pretty well, considering the comments below the post...but these were in the Example Scripts part of the forum..Measure how much your script is using:http://www.autoitscript.com/forum/index.php?showtopic=98592Measure how much a specific process is using:http://www.autoitscript.com/forum/index.php?showtopic=55877With a little time spent it should not be too hard to incorporate a method that looks at all the processes instead of just one.Good luck! Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
TurionAltec Posted October 10, 2009 Share Posted October 10, 2009 Run("Taskmgr.exe") While 1 ConsoleWrite(StatusbarGetText("Windows Task Manager","",2)&@CRLF) sleep(1000) WEnd Link to comment Share on other sites More sharing options...
trademaid Posted October 12, 2009 Author Share Posted October 12, 2009 This will do be, though i prefer not to have task manger present. In an ideal world would like to know useage of just one process. The first far more elaborate script will take a bit of work to strip down. Thank you both for replies. Link to comment Share on other sites More sharing options...
trademaid Posted October 12, 2009 Author Share Posted October 12, 2009 (edited) my crude code is below if anyone wants it. it sounds ding when the cpu drops below 100 Run("Taskmgr.exe") $counter = 0 While 1 $op = StatusbarGetText("Windows Task Manager", "", 2) If $op <> "CPU Usage: 100%" Then $counter = $counter + 1 If $counter > 10 Then SoundPlay("c:\windows\media\ding.wav") $counter = 0 EndIf EndIf If $op = "CPU Usage: 100%" Then $counter = 0 TrayTip($op,$counter,2) ;ConsoleWrite($op & " " & $counter & @CRLF) Sleep(1000) WEnd Edited October 12, 2009 by trademaid 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