Sign in to follow this  
Followers 0
mikrop

GuiCtrlCreateTreeView

5 posts in this topic

#include <GUIConstants.au3>

GUICreate(" - Proces Kille - ",350, 260)

GUICtrlCreateGroup (" All sputěné procesy ", 10, 10, 220, 228)
 GUIStartGroup()
$treeproces = GuiCtrlCreateTreeView(20, 30, 200, 192, $TVS_CHECKBOXES)
 $list = ProcessList()
  For $i = 1 To $list[0][0]
   $radek = GuiCtrlCreateTreeViewItem($list[$i][0], $treeproces)
  Next

Func pokus()                                                  ;?
 $list = ProcessList()                                     ;?
  For $i = 1 To $list[0][0]                              ;?
   $prectenahodnota = GUICtrlRead($radek)    ;?
    MsgBox ( 0, $list[$i][0], $prectenahodnota)   ;?
  Next                                                          ;?
EndFunc                                                      ;?

;*** info spustenych procesu ***

GuiCtrlCreateLabel("  Celkem sputěno procesů :  ", 20, 230, 140, 15)
 GuiCtrlCreateLabel($list[0][0], 160, 230, 20, 15)

;***************************

$killbutton = GuiCtrlCreateButton("Kill", 260, 20, 60, 25)

GUISetState()
While 1
 $msg = GUIGetMsg()
 If $msg = $killbutton Then
  pokus()
 EndIf
  Select
   Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
   EndSelect
WEnd

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

A Good Suggestion.

Dont run this program

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

I don't speak german, or whichever language that it (it looks german to me). It seems to be a process ender(?), however, I don't see the ProcessClose() command or a DLLCall...I don't intend on running it without someone translating it for me...I don't use too much GUI either, so I don't know exactly what happens in the GUI when the pokus() function is called.


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Guys, what are you smoking? lol, there seems to be no harm here, false alarm I guess...

EDIT: But why is it in the support forum? I ahevn't run it because I'm at my cousins house and I'm too lazy to... :) No description was given either.

Edited by layer

FootbaG

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

It currently does nothing. It creates a checkbox treeview with all the running processes and a "Kill" button. When you click the Kill button, it goes through each item in the treeview and tells you what GuiCtrlRead() returns from it (kind of a pain, lots of message boxes). Innocent though. Looks like the beginning of a process killer.

*Edit: Correction, it actually does GuiCtrlRead on $radek, which is set multiple times, and is actually only the last item in the treeview. This version will now show a message box for each item checked in the treeview.

#include <GUIConstants.au3>

GUICreate(" - Proces Kille - ", 350, 260)

GUICtrlCreateGroup(" All sputené procesy ", 10, 10, 220, 228)
GUIStartGroup()
$treeproces = GUICtrlCreateTreeView(20, 30, 200, 192, $TVS_CHECKBOXES)
$list = ProcessList()
Dim $radeks[$list[0][0] + 1]

For $i = 1 To $list[0][0]
    $radeks[$i] = GUICtrlCreateTreeViewItem($list[$i][0], $treeproces)
Next

Func pokus()
    $list = ProcessList()
    For $i = 1 To $list[0][0]
        $prectenahodnota = GUICtrlRead($radeks[$i])
        If BitAND($prectenahodnota, $GUI_CHECKED) Then
            MsgBox(0, $list[$i][0], $prectenahodnota)
        EndIf
    Next
EndFunc

;*** info spustenych procesu ***

GUICtrlCreateLabel("  Celkem sputeno procesu :  ", 20, 230, 140, 15)
GUICtrlCreateLabel($list[0][0], 160, 230, 20, 15)

;***************************

$killbutton = GUICtrlCreateButton("Kill", 260, 20, 60, 25)

GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $killbutton Then
        pokus()
    EndIf
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd
Edited by Saunders

Share this post


Link to post
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
Sign in to follow this  
Followers 0