Jump to content

SysControl - launch program, set volume, watch processes


Recommended Posts

Hi,

after a long night and a rainy morning, i think i'm finished with my new project: Syscontrol :)

First of all, thanks to Volly and Xenobiologist for _Audio.au3, to PsaltyDS for _ProcessListProperties.au3, to w0uter for ReduceMemory UDF and The Kandie Man for Process Suspend/Process Resume!

Here is a picutre of the version i use, personalized with programs i use ;)

post-38066-1244983502_thumb.jpg

Features:

  • Launch programs
  • set Volume
  • Refresh Listview
  • Suspend/Resume/Kill Process
  • Open directory of a process

Most i like, that the Listview is updateted line by line. Old process will be deleted automaticly and new processes are inserted at the "right" location.

#NoTrayIcon
Opt("GUIOnEventMode", 1)
#include <GuiComboBoxEx.au3>
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIImageList.au3>
#include <GUIListView.au3>
#include <GUISlider.au3>

#include <ButtonConstants.au3>
#include <Constants.au3>
#include <ComboConstants.au3>
#include <ListviewConstants.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#include <include\_Audio.au3>
#include <include\_ProcessListProperties.au3>
#include <include\_ProcessSuspendResume.au3>
#include <include\_ReduceMemory.au3>


Dim $iHGap = 5, $iVGap = 68, $iCount = 11, $iSize = 48, $iGap = 5, $icon[$iCount + 1], $oIcon[$iCount + 1], $title = "SysControl"
Dim $state_suspend = 0, $state_resume = 0, $state_kill = 0, $state_open = 0
Dim $hListview

$gui = GUICreate($title, 336, 542, -1, -1, -1, $WS_EX_TOOLWINDOW)

;~ TrueCrypt
GUICtrlCreateGroup("TrueCrypt", 5, 1, 108, 67)
$bn_mount = GUICtrlCreateButton("Mount", 13, 15, 92, 20)
GUICtrlSetOnEvent($bn_mount, "_Button_Mount")
$bn_dismount = GUICtrlCreateButton("Dismount", 13, 42, 92, 20)
GUICtrlSetOnEvent($bn_dismount, "_Button_Dismount")
GUICtrlCreateGroup("", -99, -99, 1, 1)

;~ Shell
GUICtrlCreateGroup("Shell", 118, 1, 212, 67)

GUICtrlCreateLabel("Modus:", 123, 18, 38, 20)
$combo_modus = _GUICtrlComboBoxEx_Create($gui, "", 164, 13, 84, 61, $CBS_DROPDOWNLIST)

GUICtrlCreateLabel("Monitor:", 123, 45, 38, 20)
$combo_monitor = _GUICtrlComboBoxEx_Create($gui, "", 164, 40, 84, 61, $CBS_DROPDOWNLIST)

$hCoImage = _GUIImageList_Create(16, 16, 5, 3)
_GUIImageList_AddIcon($hCoImage, @SystemDir & "\shell32.dll", 160)
_GUIImageList_AddIcon($hCoImage, @ScriptDir & "\icons\game.ico", 0)
_GUIImageList_AddIcon($hCoImage, @SystemDir & "\shell32.dll", 131)
_GUIImageList_AddIcon($hCoImage, @ScriptDir & "\icons\mon_on.ico", 0)
_GUIImageList_AddIcon($hCoImage, @ScriptDir & "\icons\mon_game.ico", 0)
_GUIImageList_AddIcon($hCoImage, @ScriptDir & "\icons\mon_off.ico", 0)
_GUICtrlComboBoxEx_SetImageList($combo_modus, $hCoImage)
_GUICtrlComboBoxEx_SetImageList($combo_monitor, $hCoImage)

_GUICtrlComboBoxEx_AddString($combo_modus, "Work", 0, 0, 0)
_GUICtrlComboBoxEx_AddString($combo_modus, "Game", 1, 1, 1)
_GUICtrlComboBoxEx_AddString($combo_modus, "Crash", 2, 2, 2)
_GUICtrlComboBoxEx_AddString($combo_monitor, "On", 3, 3, 3)
_GUICtrlComboBoxEx_AddString($combo_monitor, "Game", 4, 4, 4)
_GUICtrlComboBoxEx_AddString($combo_monitor, "Off", 5, 5, 5)

_GUICtrlComboBoxEx_SetCurSel($combo_modus, -1)
_GUICtrlComboBoxEx_SetCurSel($combo_monitor, -1)


$bn_ok = GUICtrlCreateButton("OK", 253, 14, 70, 20)
$bn_default = GUICtrlCreateButton("Default", 253, 42, 70, 20)
GUICtrlCreateGroup("", -99, -99, 1, 1)

;~ Icons
GUICtrlCreateGroup("", $iHGap, $iVGap, Ceiling($iCount / 2) * $iSize + (2 + (Ceiling($iCount / 2) + 1) * $iGap), 2 * $iSize + 3 * $iGap + 8)
For $a = 0 To $iCount
    $oIcon[$a] = 1
    If $a < $iCount / 2 Then
        $icon[$a] = GUICtrlCreateIcon("", -1, $iHGap + $iGap + ($a * $iSize) + ($a * $iGap) + 1, $iVGap + 2 * $iGap + 2, $iSize, $iSize, $SS_Notify)
    Else
        $b = $a - Ceiling($iCount / 2)
        $icon[$a] = GUICtrlCreateIcon("", -1, $iHGap + $iGap + ($b * $iSize) + ($b * $iGap) + 1, $iVGap + 3 * $iGap + $iSize + 2, $iSize, $iSize, $SS_Notify)
    EndIf
    GUICtrlSetImage($icon[$a], "shell32.dll", 32)
    GUICtrlSetOnEvent($icon[$a], "_Button_Icon")
Next

GUICtrlCreateGroup("", -99, -99, 1, 1)

;~ Master Volume
$group_mv = GUICtrlCreateGroup("Master Volume:", 5, 189, 325, 35)
$mv = GUICtrlCreateSlider(7, 202, 321, 20, BitOR($TBS_AUTOTICKS, $TBS_ENABLESELRANGE))
GUICtrlSetLimit($mv, 100, 0)
GUICtrlSetData($mv, _SoundGetMasterVolume())
GUICtrlSetData($group_mv, "Master Volume: " & _SoundGetMasterVolume() & "%")

;~ Wave Volume
$group_wv = GUICtrlCreateGroup("Wave Volume:", 5, 226, 325, 35)
$wv = GUICtrlCreateSlider(7, 239, 321, 20, BitOR($TBS_AUTOTICKS, $TBS_ENABLESELRANGE))
GUICtrlSetLimit($wv, 100, 0)
GUICtrlSetData($wv, _SoundGetWaveVolume())
GUICtrlSetData($group_wv, "Wave Volume: " & _SoundGetWaveVolume() & "%")

;~ ProcessList
$listview = GUICtrlCreateListView("Process Name|PID|CPU|RAM", 5, 266, 325, 245, $LVS_SHOWSELALWAYS)
$hListview = GUICtrlGetHandle($listview)
GUICtrlSetOnEvent($listview, "Object_Listview")
_GUICtrlListView_SetExtendedListViewStyle($listview, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
_GUICtrlListView_SetColumn($listview, 0, "Process Name", 156)
_GUICtrlListView_SetColumn($listview, 1, "PID", 50, 2)
_GUICtrlListView_SetColumn($listview, 2, "CPU", 50, 2)
_GUICtrlListView_SetColumn($listview, 3, "RAM", 50, 2)
$hImage = _GUIImageList_Create()
_GUICtrlListView_SetImageList($listview, $hImage, 1)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY_EVENTS")

$listview_header = HWnd(_GUICtrlListView_GetHeader($listview))
$wProcNew = DllCallbackRegister("_HeaderWindowProc", "ptr", "hwnd;uint;wparam;lparam")
$wProcOld = _WinAPI_SetWindowLong($listview_header, $GWL_WNDPROC, DllCallbackGetPtr($wProcNew))

$progress = GUICtrlCreateProgress(5, 512, 325, 4, $PBS_SMOOTH)

$dummy = GUICtrlCreateIcon("", 0, 0, 0)
GUICtrlSetState($dummy, $GUI_HIDE)

$bn_Update = GUICtrlCreateButton("Update", 4, 518, 62, 20)
$bn_Suspend = GUICtrlCreateButton("Suspend", 71, 518, 61, 20)
$bn_Resume = GUICtrlCreateButton("Resume", 137, 518, 61, 20)
$bn_Kill = GUICtrlCreateButton("Kill", 203, 518, 61, 20)
$bn_Open = GUICtrlCreateButton("Open", 269, 518, 62, 20)

;~ SetOnEvent Functions
GUICtrlSetOnEvent($bn_default, "_Button_Default")
GUICtrlSetOnEvent($bn_ok, "_Button_OK")
GUICtrlSetOnEvent($bn_Update, "_Button_Update")
GUICtrlSetOnEvent($bn_Suspend, "_Button_Suspend")
GUICtrlSetOnEvent($bn_Resume, "_Button_Resume")
GUICtrlSetOnEvent($bn_Kill, "_Button_Kill")
GUICtrlSetOnEvent($bn_Open, "_Button_Open")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetState()
_ProcessLoadInfo()

_GUICtrlListView_RegisterSortCallBack($listview, True, False)

While 1
    _GUIControl()
    _ReduceMemory(@AutoItPID)
    Sleep (10)
WEnd

Exit

;~ Functions
Func _Button_Icon()
    Switch @GUI_CtrlId
        Case $icon[0]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[1]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[2]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[3]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[4]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[5]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[6]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[7]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[8]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[9]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[10]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
        Case $icon[11]
            MsgBox(0, "Script Line: " & @ScriptLineNumber, "Launch programm")
    EndSwitch
EndFunc   ;==>_Button_Icon

Func _Button_Default()
    _GUICtrlComboBoxEx_SetCurSel($combo_modus, -1)
    _GUICtrlComboBoxEx_SetCurSel($combo_monitor, -1)
EndFunc   ;==>_Button_Default

Func _Button_Mount()
    MsgBox(0, "Script Line: " & @ScriptLineNumber, "Used for mounting drives")
EndFunc   ;==>_Button_Mount

Func _Button_Dismount()
    MsgBox(0, "Script Line: " & @ScriptLineNumber, "Used for dismounting drives")
EndFunc   ;==>_Button_Dismount

Func _Button_OK()
    MsgBox(0, "Script Line: " & @ScriptLineNumber, "I Turn On/Off my TV and start/close several apps")
;~  $sCoModus = _GUICtrlComboBoxEx_GetItem($combo_modus, _GUICtrlComboBoxEx_GetCurSel($combo_modus))
;~  $sCoMonitor = _GUICtrlComboBoxEx_GetItem($combo_monitor, _GUICtrlComboBoxEx_GetCurSel($combo_monitor))
EndFunc   ;==>_Button_OK

Func _Button_Update()
    _ProcessInfoUpdate()
EndFunc   ;==>_Button_Update

Func _Button_Suspend()
    If $state_suspend = 0 Then
        $state_suspend = 1
    EndIf
EndFunc   ;==>_Button_Suspend

Func _Button_Resume()
    If $state_resume = 0 Then
        $state_resume = 1
    EndIf
EndFunc   ;==>_Button_Resume

Func _Button_Kill()
    If $state_kill = 0 Then
        $state_kill = 1
    EndIf
EndFunc   ;==>_Button_Kill

Func _Button_open()
    If $state_open = 0 Then
        $state_open = 1
    EndIf
EndFunc   ;==>_Button_open

Func Object_Listview()
    _GUICtrlListView_SortItems($hListview, GUICtrlGetState($listview))
EndFunc   ;==>Object_Listview

Func _Exit()
    _GUICtrlListView_UnRegisterSortCallBack($hListview)
    GUIDelete()
    Exit
EndFunc   ;==>_Exit

Func _GUIControl()
;~  Check states and start operations
    If $state_suspend = 1 Then
        $selection = _GUICtrlListView_GetSelectedIndices($hListview, True)
        If $selection[0] <> 0 Then
            For $c = 1 To $selection[0]
                _ProcessSuspend(_GUICtrlListView_GetItemText($hListview, $selection[$c],1))
            Next
        EndIf
        $state_suspend = 0
    EndIf
    If $state_resume = 1 Then
        $selection = _GUICtrlListView_GetSelectedIndices($hListview, True)
        If $selection[0] <> 0 Then
            For $c = 1 To $selection[0]
                _ProcessResume(_GUICtrlListView_GetItemText($hListview, $selection[$c],1))
            Next
        EndIf
        $state_resume = 0
    EndIf
    If $state_kill = 1 Then
        $selection = _GUICtrlListView_GetSelectedIndices($hListview, True)
        If $selection[0] <> 0 Then
            For $c = 1 To $selection[0]
                ProcessClose(_GUICtrlListView_GetItemText($hListview, $selection[$c],1))
                _GUICtrlListView_DeleteItem($hListview, $selection[$c])
            Next
        EndIf
        $state_kill = 0
    EndIf
    If $state_open = 1 Then
        $selection = _GUICtrlListView_GetSelectedIndices($hListview, True)
        If $selection[0] <> 0 Then
            For $c = 1 To $selection[0]
                $pName = _WinAPI_ProcessGetFilename(_GUICtrlListView_GetItemText($hListview, $selection[$c],1), False)
                $pDir = _WinAPI_ProcessGetFilename(_GUICtrlListView_GetItemText($hListview, $selection[$c],1), True)
                ShellExecute(StringReplace($pDir, $pName, ""))
            Next
        EndIf
        $state_open = 0
    EndIf
;~  Check MouseOver Image and change//check if Volume changed
    $cursor = GUIGetCursorInfo()
    If Not @error Then
        For $a = 0 To $iCount
            If $cursor[4] = $icon[$a] And $oIcon[$a] = 1 Then
                $oIcon[$a] = 0
                GUICtrlSetImage($icon[$a], "shell32.dll", 33)
            ElseIf $cursor[4] <> $icon[$a] And $oIcon[$a] = 0 Then
                $oIcon[$a] = 1
                GUICtrlSetImage($icon[$a], "shell32.dll", 32)
            EndIf
        Next
        If $cursor[4] = $mv Then
            If _GUICtrlSlider_GetPos($mv) <> _SoundGetMasterVolume() Then
                _SoundSetMasterVolume(_GUICtrlSlider_GetPos($mv))
                GUICtrlSetData($group_mv, "Master Volume: " & _SoundGetMasterVolume() & "%")
            EndIf
        EndIf
        If $cursor[4] = $wv Then
            If _GUICtrlSlider_GetPos($wv) <> _SoundGetWaveVolume() Then
                SoundSetWaveVolume(_GUICtrlSlider_GetPos($wv))
                GUICtrlSetData($group_wv, "Wave Volume: " & _SoundGetWaveVolume() & "%")
            EndIf
        EndIf
    EndIf
EndFunc   ;==>_GUIControl

Func _ProcessLoadInfo()
;~  Get ProcessListProperties
    $PLP = _ProcessListProperties()
    _ArraySort($PLP)
;~  Add items to Listview
    GUICtrlSetData($progress, 0)
    For $a = 1 To $PLP[0][0]
        GUICtrlSetData($progress, ($a / $PLP[0][0]) * 100)
        _GUIControl()
        $p_name = $PLP[$a][0]
        $p_pid = Int($PLP[$a][1])
        $p_cpu = $PLP[$a][6]
        $p_ram = StringReplace(Round($PLP[$a][7] / (1024 * 1024), 0), ".", ",")
        If $p_name <> "System Idle Process" And $p_name <> "System" And $p_name <> "" Then
            GUICtrlCreateListViewItem($p_name & "|" & $p_pid, $listview)
            $hLV_i = _GUICtrlListView_FindInText($listview, $p_pid)
            _GUICtrlListView_SetItemText($listview, $hLV_i, $p_cpu, 2)
            _GUICtrlListView_SetItemText($listview, $hLV_i, $p_ram, 3)
            $fName = _WinAPI_ProcessGetFilename($PLP[$a][1], True)
            $setImage = GUICtrlSetImage($dummy, $fName)
            If $setImage = 1 Then
                $hImageIndex = _GUIImageList_AddIcon($hImage, $fName, 0)
            Else
                $hImageIndex = _GUIImageList_AddIcon($hImage, "shell32.dll", 2)
            EndIf
            _GUICtrlListView_SetItemImage($hListview, $hLV_i, $hImageIndex, 0)
        EndIf
    Next
    GUICtrlSetData($progress, 100)
EndFunc   ;==>_ProcessLoadInfo

Func _ProcessInfoUpdate()
    GUICtrlSetState($bn_Update, $GUI_DISABLE)

;~  Get Items in Listview and create array with PID|Process Name
    $hLV_c = _GUICtrlListView_GetItemCount($hListview)
    Local $hLV_a[$hLV_c + 1][2]
    $hLV_a[0][0] = $hLV_c
    For $a = 0 To $hLV_c - 1
        $hLV_a[$a + 1][0] = Int(_GUICtrlListView_GetItemText($hListview, $a, 1))
        $hLV_a[$a + 1][1] = _GUICtrlListView_GetItemText($hListview, $a, 0)
    Next
;~ Get Running Process and remove "System" and "[System Process]" from array
    $PL_a = ProcessList()
    $PL_s1 = _ArraySearch($PL_a, "System", 0, 0, 0, 0, 1, 1)
    $PL_s2 = _ArraySearch($PL_a, "[System Process]", 0, 0, 0, 0, 1, 1)
    If $PL_s1 <> -1 Then _ArrayDelete($PL_a, $PL_s1)
    If $PL_s2 <> -1 Then _ArrayDelete($PL_a, $PL_s2)
    $PL_a[0][0] = UBound($PL_a) - 1

;~ Add ProcessList-Array to Listview-Array and sort by PID
    For $a = 1 To $PL_a[0][0]
        ReDim $hLV_a[UBound($hLV_a) + 1][2]
        $hLV_a[UBound($hLV_a) - 1][0] = Int($PL_a[$a][1])
        $hLV_a[UBound($hLV_a) - 1][1] = $PL_a[$a][0]
    Next
    $hLV_a[0][0] = UBound($hLV_a) - 1
    _ArraySort($hLV_a, 0, 0, 0, 0)

;~  Find duplicate Items by PID, delete them and sort by Process Name
    Local $hLV_d[1]
    For $a = 1 To UBound($hLV_a) - 2
        If $hLV_a[$a][0] = $hLV_a[$a + 1][0] Then
            ReDim $hLV_d[UBound($hLV_d) + 1]
            $hLV_d[0] = UBound($hLV_d) - 1
            $hLV_d[$hLV_d[0]] = $a
        EndIf
    Next
    For $a = $hLV_d[0] To 1 Step -1
        _ArrayDelete($hLV_a, $hLV_d[$a])
    Next
    $hLV_a[0][0] = UBound($hLV_a) - 1
    _ArraySort($hLV_a, 0, 0, 0, 1)

;~  Updating Listview:   If Process on list does not exists, remove from list
;~  Updating Listview:   If Process on list exists, update data
;~  Updating Listview:   If Process not on list exists, add it
    Dim $k = 0
    $PLP = _ProcessListProperties()
    GUICtrlSetData($progress, 0)
    For $a = 1 To $hLV_a[0][0]
        GUICtrlSetData($progress, ($a / $PLP[0][0]) * 100)
        _GUIControl()
        If ProcessExists($hLV_a[$a][0]) = 0 Then
            $hLV_f = _GUICtrlListView_FindInText($hListview, $hLV_a[$a][0])
            If $hLV_f <> -1 Then
                $hLV_i = $hLV_f
                _GUICtrlListView_DeleteItem($hListview, $hLV_f)
                $k += 1
            EndIf
        Else
            $PLP_s = _ArraySearch($PLP, $hLV_a[$a][0], 0, 0, 0, 0, 1, 1)
            If $PLP_s <> -1 Then
                $p_name = $PLP[$PLP_s][0]
                $p_pid = Int($PLP[$PLP_s][1])
                $p_cpu = Int($PLP[$PLP_s][6])
                $p_ram = Int(StringReplace(Round($PLP[$PLP_s][7] / (1024 * 1024), 0), ".", ","))
            Else
                $process = _ProcessListProperties($hLV_a[$a][0])
                If $process[0][0] > 0 Then
                    $p_name = $process[1][0]
                    $p_pid = Int($process[1][1])
                    $p_cpu = Int($process[1][6])
                    $p_ram = Int(StringReplace(Round($process[1][7] / (1024 * 1024), 0), ".", ","))
                Else
                    $p_pid = $hLV_a[$a][0]
                EndIf
            EndIf
            $hLV_i = _GUICtrlListView_FindInText($hListview, $p_pid)

            If $hLV_i <> -1 Then
                _GUICtrlListView_SetItemText($hListview, $hLV_i, $p_name, 0)
                _GUICtrlListView_SetItemText($hListview, $hLV_i, $p_cpu, 2)
                _GUICtrlListView_SetItemText($hListview, $hLV_i, $p_ram, 3)
            Else
                $hLV_i = _GUICtrlListView_InsertItem($hListview, $p_name, $a - $k - 1)
                _GUICtrlListView_SetItemText($hListview, $hLV_i, $p_pid, 1)
                _GUICtrlListView_SetItemText($hListview, $hLV_i, $p_cpu, 2)
                _GUICtrlListView_SetItemText($hListview, $hLV_i, $p_ram, 3)
                $fName = _WinAPI_ProcessGetFilename($p_pid, True)
                $setImage = GUICtrlSetImage($dummy, $fName)
                If $setImage = 1 Then
                    $hImageIndex = _GUIImageList_AddIcon($hImage, $fName, 0)
                Else
                    $hImageIndex = _GUIImageList_AddIcon($hImage, "shell32.dll", 2)
                EndIf
                _GUICtrlListView_SetItemImage($hListview, $hLV_i, $hImageIndex, 0)
            EndIf
        EndIf
    Next
    GUICtrlSetData($progress, 100)
    GUICtrlSetState($bn_Update, $GUI_ENABLE)
EndFunc   ;==>_ProcessInfoUpdate

Func WM_NOTIFY_EVENTS($hWndGUI, $MsgID, $wParam, $lParam)
    Local $HDN_FIRST = -300
    Local $HDN_ITEMCHANGINGA = $HDN_FIRST - 0
    Local $TagNMHDR = DllStructCreate("int;int;int", $lParam)
    If @error Then Return

    Local $iEvent = DllStructGetData($TagNMHDR, 3)
    If $iEvent = $HDN_ITEMCHANGINGA Or $iEvent = $HDN_ITEMCHANGINGW Then Return 1

    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_NOTIFY_EVENTS

Func _HeaderWindowProc($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam
    Switch $hWnd
        Case $listview_header
            Switch $iMsg
                Case $WM_SETCURSOR
                    Return 0
            EndSwitch
    EndSwitch
    Return _WinAPI_CallWindowProc($wProcOld, $hWnd, $iMsg, $wParam, $lParam)
EndFunc   ;==>_HeaderWindowProc

I hope u enjoy it, and i really like to hear your opinions :)

if u want to test the script, download the attachment, or copy it and comment scriptlines 53 to 71 out, because some icons are loaded there!

Greetings from Germany :)

13 downloads so far :)

SysControl.zip

Edited by yetrael
Link to comment
Share on other sites

looks very nice, very professional.

Seems to be very customized for your needs, wasn't sure what to select. Showed many recycle cans and didn't update the process list.

Last observation. It ran the CPU in th 40s. Probably need to add sleeps or something

Picea

Link to comment
Share on other sites

Thanks for your reply :D

About the recycle cans: In my version (that one from the picture) the cans are icons from several programs in black/white. On mouse over i load the same pic just with colors. To demonstrate it, i used the recycler icon from shell32.dll :D

Changed the script, in the main loop (ScriptLines 144 to 148) i added a Sleep(10). I think this should fix it.

About the update... the problem is the call of _ProcessListProperties. On my machine the call lasts about 2seconds, on my eeePC around 10seconds. I tried to get the processes with ProcessList and then call every single process with _ProcessListProperties, but this call lasts about 1seconds for every process... so i decided to make one big call...

I could do without_ProcessListProperties, but there isn't a fast function to get the processes cpu usage...

Link to comment
Share on other sites

  • 1 month later...

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...