Function WinSetOnTopByHandle

  • Sets whether a window is on top of all other windows.

    Parameters

    • windowHandle: bigint

      The handle of the window to set on top.

    • onTop: boolean

      Whether to set the window on top or not.

    Returns number

    1 if the operation was successful, 0 otherwise.

    import { WinSetOnTopByHandle, WinGetHandle } from '@ahmic/autoit-js';

    const windowHandle = WinGetHandle('Untitled - Notepad');

    WinSetOnTopByHandle(windowHandle, true);