1

我有这个代码 AutoHotkey 代码:

#NoTrayIcon
If WinExist("Mozilla Thunderbird")
{
  WinActivate, Mozilla Thunderbird
}
Else
{
  Run "c:/Users/xah/Desktop/Mozilla Thunderbird.lnk"
  WinActivate
}
Return
ExitApp

一键激活。但是当运行两次(有时按两次键)时,它似乎会停用窗口并更改鼠标位置。

如何解决?

(这对我来说很痛苦,因为我有自动窗口焦点。当鼠标位置更改到另一个位置时,该窗口会弹出到前面)

谢谢。

4

1 回答 1

1

ahk论坛有人回答了。 http://www.autohotkey.com/forum/post-413075.html#413075

基本上,我的脚本实际上每次都在运行 Else 子句。我需要的是添加

SetTitleMatchMode, 2

在开头,因此如果标题包含字符串,则标题匹配。

于 2011-01-09T13:28:06.027 回答