DetectHiddenText

Determines whether invisible text in a window is "seen" for the purpose of finding the window. This affects windowing functions such as WinExist and WinActivate.

PrevSetting := DetectHiddenText(Setting)

Parameters

Setting

Type: Boolean

If true, hidden text detection is enabled.

If false, hidden text detection is disabled.

Return Value

Type: Integer (boolean)

This function returns the previous setting; either 0 (false) for disabled or 1 (true) for enabled.

Remarks

By default, hidden text detection is enabled.

"Hidden text" is a term that refers to those controls of a window that are not visible. Their text is thus considered "hidden". Turning off DetectHiddenText can be useful in cases where you want to detect the difference between the different panes of a multi-pane window or multi-tabbed dialog. Use Window Spy to determine which text of the currently-active window is hidden. All built-in functions that accept a WinText parameter are affected by this setting, including WinActivate, WinActive, WinWait, and WinExist.

The built-in variable A_DetectHiddenText contains the current setting and can also be assigned a new value instead of calling DetectHiddenText.

Every newly launched thread (such as a hotkey, custom menu item, or timed subroutine) starts off fresh with the default setting for this function. That default may be changed by using this function during script startup.

DetectHiddenWindows

Examples

Turns off the detection of hidden text.

DetectHiddenText false