使用 Shift+Escape 来显示活动窗口
; 示例: 使用 Shift+Escape 来显示活动窗口
; 进程的命令行. 需要 XP 或更高版本.
+Esc::
WinGet pid, PID, A
; 获取 WMI 服务对象.
wmi := ComObjGet("winmgmts:")
; 执行查询以获取匹配进程.
queryEnum := wmi.ExecQuery(""
. "Select * from Win32_Process where ProcessId=" . pid)
._NewEnum()
; 获取首个匹配进程.
if queryEnum[process]
MsgBox 0, Command line, % process.CommandLine
else
MsgBox Process not found!
; 释放所有全局对象 (使用局部变量时不需要这么做).
wmi := queryEnum := process := ""
return
; Win32_Process: http://msdn.microsoft.com/en-us/library/aa394372.aspx
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

