WinTitle
https://www.autohotkey.com/docs/v2/misc/WinTitle.htm
The WinTitle doc page talks about the window title, but does not explain it nor (early and simply) exemplify. In contrast other WinTitle alternatives on that page like A have simple inline examples e.g. MsgBox WinExist("A")
Suggestion: Add a subsection named "Window Title" (above "Matching Behaviour") with this short explainer text:
---
The title of a window is often visible as text in a title bar at the top of the window. If invisible or only partially visible the complete window title can be read with WinGetTitle or Window Spy.
For example the Calculator app has the window title "Calculator", which can be used as WinTitle parameter
WinActivate("Calculator")
---
SetTitleMatchMode
https://www.autohotkey.com/docs/v2/lib/SetTitleMatchMode.htm
Add a simple side by side example of MatchMode use:
#3 Four ways to activate a window titled "Calculator"
Code: Select all
SetTitleMatchMode 1 ;must start with
WinActivate("Calcu")
SetTitleMatchMode 2 ;contain anywhere
WinActivate("alculato")
SetTitleMatchMode 3 ;match exactly
WinActivate("Calculator")
SetTitleMatchMode "RegEx"
WinActivate("Cal.*ato")