moduleGetAction()

Returns the state of a selected attribute for a menu entry.

Synopsis

anytype moduleGetAction(int id, string attribute);

Parameters

Parameter Meaning
id Id of the menu entry
attribute

Following attributes are available:

  • enabled => returns the enabled state of the menu entry

  • visible => returns the visible state of the menu entry

  • separator => returns the separator state of the menu entry

  • text => returns the text of the menu entry

  • checkable => returns the checkable state of the menu entry

  • checked => returns the checked state of the menu entry

Return value

The value of the selected attribute.

Error

Missing or invalid arguments.

Description

Returns the state of the selected attribute of the menu entry.

Example

Returns the checked state of the menu entry with the ID "id" and sends it to the log viewer.

main()

{

DebugN(moduleGetAction(id, "checked"));

}

Assignment

Miscellaneous functions

Availability

UI

See also

moduleAddDockModule(), moduleAddMenu(), moduleAddSubMenu(), moduleAddToolBar()