WinTitle "both" Topic is solved

Share your ideas as to how the documentation can be improved.
lexikos
Posts: 9665
Joined: 30 Sep 2013, 04:07
Contact:

WinTitle "both"

19 Jun 2023, 06:45

While fixing a bug (WinTitle ahk_exe allows any single character before it), something came to my attention.

There's a comment in the source code:
// Omit exactly one space or tab from the title criterion.
I had forgotten this rule (it had never mattered to me anyway):
Criteria beyond the first should be separated from the previous with exactly one space or tab
Before I found where that's documented, I read this:
An ahk_ criterion always consists of an ahk_ keyword and its criterion value, both separated by zero or more spaces or tabs.
Source: WinTitle & Last Found Window | AutoHotkey v2
When talking about a relation between two items, it is redundant to use the word "both" - and to me it sounds unnatural. It's not possible for only one to be separated by a space while the other isn't, unless the thing(s) they're being separated from aren't each other. Therefore, I tend to think that "both" implies a relation between each of the two items and a third unnamed item. In other words, it could be saying that the ahk_ keyword may be separated from the previous item by zero spaces, which is untrue. I suppose that simply removing "both" would be a sufficient fix.

I think it would be worthwhile for the ahk_ section to mention the rule for separating ahk_ from any previous criteria, even though it is documented under Multiple Criteria.
User avatar
Ragnar
Posts: 627
Joined: 30 Sep 2013, 15:25

Re: WinTitle "both"  Topic is solved

20 Jun 2023, 09:15

Thanks for reporting. I've changed it.

Return to “Suggestions on Documentation Improvements”

Who is online

Users browsing this forum: No registered users and 1 guest