Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Killing processes - AHK

So far I have:

Process, Exist notepad.exe
Process, Close, %p_id%

How do you set ahk to kill the process if it exists? I read it's something to do with the PID, but don't know how to implement that.

like image 216
Armad X Avatar asked Oct 02 '13 23:10

Armad X


1 Answers

Have a look at the Documentation.

You can kill by simply using the name of the process:

Process, Close, notepad.exe

If the process does not exist, it will do nothing.

If you still would like to kill the process by using the pid instead, you must use the WinGet command in order to retrieve the pid.

like image 145
Elliot DeNolf Avatar answered Sep 26 '22 14:09

Elliot DeNolf