Function ControlFocus

  • Sets the keyboard focus to a control in a window.

    Parameters

    • windowTitle: string

      The title of the window to access.

    • windowText: string

      Optional text found in the window.

    • controlId: string

      The ID of the control to focus.

    Returns number

    1 if success, 0 if failure.

    import { ControlFocus } from '@ahmic/autoit-js';

    ControlFocus('Untitled - Notepad', '', 'Edit1');