docs » cp.apple.finalcutpro.MenuBar


Represents the Final Cut Pro menu bar, providing functions that allow different tasks to be accomplished.

API Overview

API Documentation

Functions

new

Signature cp.apple.finalcutpro.MenuBar:new(App) -> MenuBar
Type Function
Description Constructs a new MenuBar for the specified App.
Parameters
  • app - The App instance the MenuBar belongs to.
Returns
  • a new MenuBar instance

selectMenu

Signature cp.apple.finalcutpro.MenuBar:selectMenu(path) -> boolean
Type Function
Description Selects a Final Cut Pro Menu Item based on the list of menu titles in English.
Parameters
  • path - The list of menu items you'd like to activate, for example:
  • select({"View", "Browser", "as List"})
Returns
  • `true` if the press was successful.

Methods

addMenuFinder

Signature cp.apple.finalcutpro.MenuBar:addMenuFinder(finder) -> nothing
Type Method
Description Registers an AXMenuItem finder function. The finder's job is to take an individual 'find' step and return either the matching child, or nil if it can't be found. It is used by the addMenuFinder function. The finder should have the following signature:
Parameters
  • `finder` - The finder function
Returns
  • The `AXMenuItem` found, or `nil`.

findMenuUI

Signature cp.apple.finalcutpro.MenuBar:findMenuUI(path) -> Menu UI
Type Method
Description Finds a specific Menu UI element for the provided path.
Parameters
  • `path` - The path list to search for.
  • `language` - The language code the path is in. E.g. "en" or "fr". Defaults to the
Returns
  • The Menu UI, or `nil` if it could not be found.

visitMenuItems

Signature cp.apple.finalcutpro.MenuBar:visitMenuItems(visitFn[, startPath]) -> nil
Type Method
Description Walks the menu tree, calling the visitFn on all the 'item' values - that is,
Parameters
  • `visitFn` - The function called for each menu item.
  • `startPath` - The path to the menu item to start at.
Returns
  • Nothing

results matching ""

    No results matching ""