philphil61 Posted October 30, 2011 Share Posted October 30, 2011 didn't want to break forum rules so posting here about my first "example script" that I'm trying to improve.... I've tried looking at ProcessListProperties for If process CPU usage 0 for 1 min then ProcessCloseto continue the script rather than using Sleep AutoIt v3 Window Info picks up >>>> Window <<<<Title: Cleanup FinishedClass: tooltips_class32Position: 805, 707Size: 309, 74Style: 0x940006C3ExStyle: 0x00080088Handle: 0x00010132 >>>> Control <<<<Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<<Position: 966, 746Cursor ID: 0Color: 0xF1F2F7 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< I would have thought that WinWaitClose would have covered the "Cleanup Finished" and "tooltips_class32" but no So which way now? I'm not experienced enough to find how to use the ProcessListProperties to watch when idle!!! Link to comment Share on other sites More sharing options...
philphil61 Posted October 30, 2011 Author Share Posted October 30, 2011 here goes my attempt using Novatek's ProcessList While 1 $iProcessCPU = _ProcessGetCPU($sProcess, 300 ) $sTip = "Process " & $sProcess & " CPU: " & $iProcessCPU & "%" If $iProcessCPU > 0 Then traytip("", $sTip ,1) Else ProcessClose("360Amigo.exe") Endif ;~ sleep(1000) ;set your own sleep time for LOOP mode WEnd thinking that if the process was in use the traytip would continue, if the process was not being used ( 0 CPU usage) then ProcessClose would action but ProcessClose kicks in before the process is completed.... 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