- Offizieller Beitrag
Hallo!
Ja, ich hab schon wider einprogramm geschrieben^^ Das Programm ist ganz einfach eigentlich.. es beendet das momentan aktive Fenster mit einem ProcessClose.. Mehr gibts nicht zu sagen
Hier das programm:
Spoiler anzeigen
;###############
;# Process Kill #
;# By Gtaspider #
;###############
;Includes
#include <process.au3>
;Auslesen des Processes des momentanen Fensters
$title = WinGetTitle("")
$pid = WinGetProcess($title)
$path = FileGetShortName(_WinGetPath($pid))
$name = _ProcessGetName($pid)
If $name = "explorer.exe" Then $name = InputBox("","process name:","explorer.exe")
For $i = 30 To 0 Step -1
$sec = StringLeft($i,1)&"."&StringRight($i,1)
If StringLen($i) = 1 Then $sec = "0."&$i
TrayTip($title,$name &" Close in "&$sec&@CRLF&$path,1)
Sleep(50)
Next
;Schließen des Prozesses
ProcessClose($pid)
Func _WinGetPath($pid = "", $strComputer = 'localhost')
If $pid = "" Then $pid = WinGetProcess(WinGetTitle(""))
$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_Process WHERE ProcessId = " & $pid, "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
If IsObj($colItems) Then
For $objItem In $colItems
If $objItem.ExecutablePath Then Return $objItem.ExecutablePath
Next
EndIf
EndFunc ;==>_WinGetPath
Mfg Spider