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.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With