我无法使用自动热键关闭Everything.exe。我甚至不能使用这个来获取窗口id;
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它应该返回类似于此的所有其他应用程序在PC上做!
The Active Windows ID is 0x013017e 我已经试过了
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还有这个
Process、Close、Everything.exe
Process、Close、ahk_class一切
Process、Close、ahk_exe Everything.exe
帮助!
发布于 2018-04-02 20:00:15
CloseProcess(PidOrExe){
Processes:=ComObjGet("winmgmts:").ExecQuery("Select * from Win32_Process")
for Process in Processes
If (Process.Name=PidOrExe || Process.ProcessID=ParentPidOrExe)
Process,Close,% process.ProcessID
}https://stackoverflow.com/questions/48938027
复制相似问题