Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/367.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Autohotkey 如何检测UWP应用程序正在运行?_Autohotkey - Fatal编程技术网

Autohotkey 如何检测UWP应用程序正在运行?

Autohotkey 如何检测UWP应用程序正在运行?,autohotkey,Autohotkey,这是我最好的猜测,但似乎不起作用。我需要一个解决方案,该解决方案不会在另一个名称中也包含OneNote的窗口上触发,但找不到该窗口。如果该可执行文件名正确且标题MatchMode正确,则代码应该可以工作。如果仍然没有,那么脚本的其他部分肯定还有另一个问题 以下是我如何不仅检测UWP窗口,而且检测所有更难检测的窗口: WinWait ahk_exe onenoteim.exe ; This is my fave TitleMatchMode since it's the most selecti

这是我最好的猜测,但似乎不起作用。我需要一个解决方案,该解决方案不会在另一个名称中也包含OneNote的窗口上触发,但找不到该窗口。

如果该可执行文件名正确且标题MatchMode正确,则代码应该可以工作。如果仍然没有,那么脚本的其他部分肯定还有另一个问题

以下是我如何不仅检测UWP窗口,而且检测所有更难检测的窗口:

WinWait ahk_exe onenoteim.exe
; This is my fave TitleMatchMode since it's the most selective
; and gives you the highest level of flexibility.
SetTitleMatchMode RegEx

...

If WinActive("ahk_class ^#32770$ ahk_exe i)\\JPEGView\.exe$")

...

; Here, I chose not to use "ahk_class ^QWidget$" as it occurs a bit too often.
hwnd := WinExist( "GoldenDict$ ahk_exe i)\\GoldenDict\.exe$")

...

Global GC_WINTITLE := " - Google Chrome$ ahk_class ^Chrome_WidgetWin_1$"
WinWait % "New Tab" GC_WINTITLE