Jump to content

Process viewer/killer


Duran
 Share

Recommended Posts

I was playing around with the processlist function and made a mini Task manager o.O But there is one thing i cant get to work or cant figure out how to do it is to close the selected file with the kill button. Here is the script so far.

#include <GUIConstants.au3>
#region; GUI Test Box
GUICreate("Test Box", 175, 300)

$Refresh = GUICtrlCreateButton("Refresh", 5, 265, 55)
$Kill = GUICtrlCreateButton("Kill", 65, 265, 45)
$Clear = GUICtrlCreateButton("Clear", 115, 265, 55)
$list = GUICtrlCreateList ("", 0,0,175,260)
GUICtrlSetLimit(-1,200)
GUISetState()
#endregion

#region; Varibles
$process = ProcessList()

#endregion

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    
    Select
        
    Case $msg = $Refresh
        For $i = 1 to $process[0][0]
            GUICtrlSetData($list,$process[$i][0] & $process[$i][1])
        Next
        
    Case $msg = $Clear
        GUICtrlSetData($list, "")
        
    Case $msg = $Kill
        ProcessClose($Kill)
    EndSelect
WEnd
Link to comment
Share on other sites

  • 8 months later...

I am looking for a script that will automatically kill any non-windows processes that are currently running to free up cpu &/or memory for heavy applications or watching videos.

Anyone who does not wonder is either omniscient or foolish.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...