Taskmanager auslesen

04/14/2011 15:09 Ludder231#1
Kann mir einer sagen ob/wie es möglich ist den Taskmanager auszulesen?

Also so das ich die laufenden Anwendungen in einer Koda form sehen kann?

In so einer Form ungefähr:
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\Ludder.LUCA\Desktop\Form2.kxf
$Form2 GUICreate("Form2"250293231154)
$Button1 GUICtrlCreateButton("Read Process"888925)
$List1 GUICtrlCreateList(""1040145292)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        case 
$button1
            
    
EndSwitch
WEnd 
Vllt iwas mit Memread?
Oder mit Cheat Engine?
04/14/2011 15:15 omer36#2
zb so:

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\Ludder.LUCA\Desktop\Form2.kxf
$Form2 GUICreate("Form2"250293231154)
$Button1 GUICtrlCreateButton("Read Process"888925)
$List1 GUICtrlCreateList(""1040145292)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        case 
$button1
            $prozess 
ProcessList()
            For 
$i=1 To Ubound($prozess)-1
                GUICtrlSetData
($List1,$prozess[$i][0])
            
Next
    
EndSwitch
WEnd 
04/14/2011 15:27 Ludder231#3
Geht es auch das ich was ausführen kann wenn ich einen Prozess anklicke?
04/14/2011 15:54 V8II#4
ja:
PHP Code:
$msg=GuiGetMsg()
case 
$List1
$wahl
=GuiCtrlRead($List1)
if 
$wahl="Beispiel" Then
; ...
endif 
...
04/14/2011 15:58 omer36#5
PHP Code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\Ludder.LUCA\Desktop\Form2.kxf
$Form2 GUICreate("Form2"250293231154)
$Button1 GUICtrlCreateButton("Read Process"888925)
$next GUICtrlCreateButton("next"8,1508925)

$List1 GUICtrlCreateList(""1040145292)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        case 
$button1
            $prozess 
ProcessList()
            For 
$i=1 To Ubound($prozess)-1
                GUICtrlSetData
($List1,$prozess[$i][0])
            
Next
        
Case $next
            MsgBox
("","",GUICtrlRead($List1))
    EndSwitch
WEnd 
gibts auch anderen befehl unter _guictrllistbox_...... aber weiß grad nicht welches
04/14/2011 16:28 Ludder231#6
Noch eins :D

Wie geht das das was blau markiert ist ausgewählt wird? Also nicht ein bestimmter process sondern jeder beliebige der ausgewählt wurde?

so gehts ja leider nur mit einem bestimmten...
PHP Code:
$process="ccc.exe"
$msg=GuiGetMsg()
case 
$List1
$wahl
=GuiCtrlRead($List1)
if 
$wahl=$process Then
GUICtrlSetData
($input1$wahl
komsciher weise gehts so, aber warum?
PHP Code:
$process1="ccc.exe"
$process2="FABS.exe"
$process3="hl2.exe"
$msg=GuiGetMsg()
case 
$List1
for $i=1 to 5
$wahl
=GuiCtrlRead($List1)
if 
$wahl=$process1 or $process2 Then
GUICtrlSetData
($input1$wahl)
endif  
next 
04/14/2011 17:19 omer36#7
sry versteh deine frage nicht ganz...

willst du nur bei "bestimmten" prozessen 'weiter' machen?
04/14/2011 17:25 Ludder231#8
Quote:
Originally Posted by omer36 View Post
sry versteh deine frage nicht ganz...

willst du nur bei "bestimmten" prozessen 'weiter' machen?
Nein, jeden wenn ich einen Prozess aus meiner liste anklicke, weil ich kann ja mit dem oben genannten befehl nur bei einem weiter machen. "CCC.exe"
04/15/2011 18:38 derpo#9
Ich verstehe nicht genau, was du meinst.
Hier ein Beispiel :
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
$Form1 GUICreate("Prozessliste"262282192124)
$Prozessliste GUICtrlCreateList(""00257214)
$Aktualisieren GUICtrlCreateButton("Aktualisieren"021625733$WS_GROUP)
$Prozessbeenden GUICtrlCreateButton("Prozess beenden"024825733$WS_GROUP)
GUISetState(@SW_SHOW)
While 
1
    $nMsg 
GUIGetMsg()
    If 
$nMsg $GUI_EVENT_CLOSE Then
        
Exit
    ElseIf 
$nMsg $Aktualisieren Then
        $Prozess 
ProcessList()
        
GUICtrlSetData($Prozessliste"")
        
GUICtrlSetData($Prozessliste$Prozess[1][0] & $Prozess[1][1])
        For 
$i 0 To $Prozess[0][0Step 1
            GUICtrlSetData
($ProzesslisteGUICtrlRead($Prozessliste) & @CRLF $Prozess[$i][0] & " - " $Prozess[$i][1])
        
Next
    
ElseIf $nMsg $Prozessbeenden Then
        $name 
GUICtrlRead($Prozessliste)
        If 
Not @error Then
            $name 
StringSplit($name" - "2)
            If 
Not @error Then
                
If IsArray($nameThen
                    $name 
StringSplit($name[UBound($name) - 1], @CRLF2)
                    
ProcessClose($name[UBound($name) - 1])
                EndIf
            EndIf
        EndIf
        
$timer TimerInit()
        While 
TimerDiff($timer) < 2000
            
If Not ProcessExists($name[UBound($name) - 1]) Then ExitLoop
        WEnd
        $Prozess 
ProcessList()
        
GUICtrlSetData($Prozessliste"")
        
GUICtrlSetData($Prozessliste$Prozess[1][0] & $Prozess[1][1])
        For 
$i 0 To $Prozess[0][0Step 1
            GUICtrlSetData
($ProzesslisteGUICtrlRead($Prozessliste) & @CRLF $Prozess[$i][0] & " - " $Prozess[$i][1])
        
Next
    
EndIf
WEnd 
04/17/2011 20:33 Ludder231#10
Quote:
Originally Posted by derpo View Post
Ich verstehe nicht genau, was du meinst.
Hier ein Beispiel :
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
$Form1 GUICreate("Prozessliste"262282192124)
$Prozessliste GUICtrlCreateList(""00257214)
$Aktualisieren GUICtrlCreateButton("Aktualisieren"021625733$WS_GROUP)
$Prozessbeenden GUICtrlCreateButton("Prozess beenden"024825733$WS_GROUP)
GUISetState(@SW_SHOW)
While 
1
    $nMsg 
GUIGetMsg()
    If 
$nMsg $GUI_EVENT_CLOSE Then
        
Exit
    ElseIf 
$nMsg $Aktualisieren Then
        $Prozess 
ProcessList()
        
GUICtrlSetData($Prozessliste"")
        
GUICtrlSetData($Prozessliste$Prozess[1][0] & $Prozess[1][1])
        For 
$i 0 To $Prozess[0][0Step 1
            GUICtrlSetData
($ProzesslisteGUICtrlRead($Prozessliste) & @CRLF $Prozess[$i][0] & " - " $Prozess[$i][1])
        
Next
    
ElseIf $nMsg $Prozessbeenden Then
        $name 
GUICtrlRead($Prozessliste)
        If 
Not @error Then
            $name 
StringSplit($name" - "2)
            If 
Not @error Then
                
If IsArray($nameThen
                    $name 
StringSplit($name[UBound($name) - 1], @CRLF2)
                    
ProcessClose($name[UBound($name) - 1])
                EndIf
            EndIf
        EndIf
        
$timer TimerInit()
        While 
TimerDiff($timer) < 2000
            
If Not ProcessExists($name[UBound($name) - 1]) Then ExitLoop
        WEnd
        $Prozess 
ProcessList()
        
GUICtrlSetData($Prozessliste"")
        
GUICtrlSetData($Prozessliste$Prozess[1][0] & $Prozess[1][1])
        For 
$i 0 To $Prozess[0][0Step 1
            GUICtrlSetData
($ProzesslisteGUICtrlRead($Prozessliste) & @CRLF $Prozess[$i][0] & " - " $Prozess[$i][1])
        
Next
    
EndIf
WEnd 
AH, danke sowas hab ich gesucht :D