I cannot close Everything.exe with autohotkey. I cant even get the window id using this;
if WinExist("ahk_class Notepad") or WinExist("ahk_class" . ClassName)
WinActivate ; Uses the last found window.
MsgBox % "The active window's ID is " . WinExist("A")
Return
it should return similar to this which all other apps on PC do!
The Active Windows ID is 0x013017e
I have already tried
StartClose("Everything.exe")
StartClose(exe)
{
Process, Exist, %exe% ; check to see if program is running
If (ErrorLevel = 0) ; If program is not running -> Run
{
Run, %exe%
}
Else ; If program is running, ErrorLevel = process id for the target program ->
Close
{
Process, Close, %ErrorLevel%
}
}
return
and this
Process, Close, Everything.exe
Process, Close, ahk_class EVERYTHING
Process, Close, ahk_exe Everything.exe
Help!
Process, Exist
returns the PID of the service, which is running in the SYSTEM context and therefore fails to close unless you run AHK as SYSTEM. – Endre Both