WinSetAlwaysOnTop()

Auto Hotkey

WinSetAlwaysOnTop

Makes a window stay on top of all other windows.

WinSetAlwaysOnTop OnOffToggle, WinTitle, WinText,  ExcludeTitle, ExcludeText
Command  Example: WinSetAlwaysOnTop "On", "A"
Function Example: WinSetAlwaysOnTop("On", "A")

Parameters

OnOffToggle (optional)

[On|Off|Toggle]: Use ON to turn on the setting, OFF to turn it off, or TOGGLE to set it to the opposite of its current state. If omitted, it defaults to TOGGLE. The word Topmost can be used in place of AlwaysOnTop.

WinTitle

A window title or other criteria identifying the target window. See WinTitle.

WinText

If present, this parameter must be a substring from a single text element of the target window (as revealed by the included Window Spy utility). Hidden text elements are detected if DetectHiddenText is ON.

ExcludeTitle

Windows whose titles include this value will not be considered.

ExcludeText

Windows whose text include this value will not be considered.

Remarks

ErrorLevel is not changed by this command except where indicated above.

Window titles and text are case sensitive. Hidden windows are not detected unless DetectHiddenWindows has been turned on.

Related

WinHide, WinSetTitle, WinMove, WinActivate, Control

Examples

WinSetAlwaysOnTop, toggle, Calculator ; Toggle the always-on-top status of Calculator.