How to specify WinTitle? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
usser
Posts: 142
Joined: 22 Oct 2014, 13:03

How to specify WinTitle?

Post by usser » 25 Jun 2022, 05:15

Hello

What is the syntax for WinTitle?
I need to enable a hotkey only when a specific window with a title (Something...) is not active (the ... can be followed with any text).

Thanks!


usser
Posts: 142
Joined: 22 Oct 2014, 13:03

Re: How to specify WinTitle?

Post by usser » 25 Jun 2022, 11:30

Thanks, maybe I wasn't clear enough but this does not seem to help at all unless I miss something.

So I have:

Code: Select all

#If (WinActive("ahk_exe chrome.exe") or WinActive("ahk_exe msedge.exe")) and not WinTitle("Something*")
A::B
I need to add a parameter "the active window does not have a title starting with "Something" and any other text after that, how do I do that?

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: How to specify WinTitle?  Topic is solved

Post by mikeyww » 25 Jun 2022, 11:39

WinTitle is not an AHK function, but that is already noted in the error message that appears with your script.

Code: Select all

#If (WinActive("ahk_exe chrome.exe") or WinActive("ahk_exe msedge.exe")) and !WinActive("Something")
a::b
#If
Explained: WinTitleSetTitleMatchMode

Post Reply

Return to “Ask for Help (v1)”