Function ControlEnable

  • Enables 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 control to enable.

    Returns number

    1 if success, 0 if failure.

    import { ControlEnable, ControlDisable } from '@ahmic/autoit-js';

    // Disable the Notepad window's edit control.
    ControlDisable('Untitled - Notepad', 'Edit1');

    // Enable the Notepad window's edit control.
    ControlEnable('Untitled - Notepad', 'Edit1');