Autohotkey,循环多个匹配的窗口,可以吗?

Jim*_*hen 2 autohotkey

我使用以下自动热键命令将 EmEditor(一个很棒的文本编辑器)带到前台。

^#1:: WinActivate, ahk_class EmEditorMainFrame3
Run Code Online (Sandbox Code Playgroud)

然而,当有多个 EmEditor 窗口(都带有类名EmEditorMainFrame3)时,选择想要激活的窗口似乎非常具有挑战性。我想实现这样的结果:多次按 Ctrl+Win+1 会在不同的 EmEditor 窗口之间循环,也就是说,每次按热键都会激活不同的 EmEditor 窗口。这是我能想象到的最好的用户体验。使用 Autohotkey 可以吗?

Rel*_*lax 5

GroupAdd, EmEditorGroup, ahk_class EmEditorMainFrame3 

^#1:: GroupActivate EmEditorGroup   ; activate the next window in this window group 
Run Code Online (Sandbox Code Playgroud)