Function WinMenuSelectItem

  • Selects a menu item in a window.

    Underlined items in the menu must be selected using the & prefix. For example, if you're following the sequence File -> Open, you would use &File and &Open in the parameters.

    Parameters

    • windowTitle: string

      The title of the window to search for.

    • windowText: string = ''

      Optional text found in the window.

    • item1: string

      The text of the first-level menu item.

    • item2: string = ''

      Optional text of the second-level menu item.

    • item3: string = ''

      Optional text of the third-level menu item.

    • item4: string = ''

      Optional text of the fourth-level menu item.

    • item5: string = ''

      Optional text of the fifth-level menu item.

    • item6: string = ''

      Optional text of the sixth-level menu item.

    • item7: string = ''

      Optional text of the seventh-level menu item.

    • item8: string = ''

      Optional text of the eighth-level menu item.

    Returns number

    1 if successful, 0 otherwise.

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

    WinMenuSelectItem('Untitled - Notepad', '', '&File', '&Open');