Duran Posted December 26, 2007 Share Posted December 26, 2007 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 More sharing options...
TomZ Posted December 26, 2007 Share Posted December 26, 2007 In order to find out which process has been selected, you need to use GUICtrlRead, so ProcessClose($Kill) should be replaced by: ProcessClose(GUICtrlRead($list)) Link to comment Share on other sites More sharing options...
Amerigo Posted September 2, 2008 Share Posted September 2, 2008 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 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