Reputation: 17535
i have this code AutoHotkey Code:
#NoTrayIcon
If WinExist("Mozilla Thunderbird")
{
WinActivate, Mozilla Thunderbird
}
Else
{
Run "c:/Users/xah/Desktop/Mozilla Thunderbird.lnk"
WinActivate
}
Return
ExitApp
activated by a key. but when run twice (sometimes pressed the key twice), it seems to deactivate the window and change mouse position.
how to fix that?
(this is a pain for me because i have auto window focus on. When mouse position changes to another location, that window pops up to front)
thanks.
Upvotes: 1
Views: 1360
Reputation: 17535
someone at ahk forum answered it. http://www.autohotkey.com/forum/post-413075.html#413075
basically, my script is actually running the Else clause everytime. What i need is to add
SetTitleMatchMode, 2
in the beginning, so the title matches if it contains the string.
Upvotes: 1