Bestimmten Prozess per Hotkey beenden?

02/12/2013 19:15 shive#1
Hallo, ich möchte per Hotkey zB. Prozess "xyz.exe" beenden.
Nur wie? :P

Hat jemand eine Idee?
02/12/2013 19:19 Syc#2
Könntest du mit nem Autoitscript lösen.

aus nem andren Forum:
Code:
HotKeySet("^+a", "_kill")
Func _kill()
If ProcessExists("explorer.exe") Then
	ProcessClose("explorer.exe")
Else
	Run("explorer.exe")
Endif
EndFunc
02/12/2013 19:57 Crucay#3
Quote:
Originally Posted by Crypt' View Post
Könntest du mit nem Autoitscript lösen.

aus nem andren Forum:
Code:
HotKeySet("^+a", "_kill")
Func _kill()
If ProcessExists("explorer.exe") Then
	ProcessClose("explorer.exe")
Else
	Run("explorer.exe")
Endif
EndFunc
Hier wird aber die Anwendung gestartet, falls sie nicht an ist ...
02/12/2013 20:17 Licane#4
Autoitscript;


Code:
#include <Misc.au3>

Local $hDLL = DllOpen("user32.dll")
If _IsPressed("79", $hDLL) Then ; 79 bedeutet in diesem falle die Taste F10
_kill
endif
Func _kill()
If ProcessExists("Processname") Then
	ProcessClose("Processname")
Endif
EndFunc

Das müsste reichen.

Wenn du eine Fertige, ausführbare .exe möchtest kannst du mir gerne eine PN schicken.