DataType:menu

From the wonderful RedGuides Wiki

Returns information about visible menus. Inherits DataType:window when a menu is open.


This Data Type is referenced in MacroQuest, and accessed by Top-Level Object(s): Menu

Members

Type Member Description
action Select Clicks a menu item.
int CurrMenu returns the index for the currently visible menu. Ordinarily this will be 0 if a menu is open and -1 if not
NumItems returns number of items in the currently open menu.
NumVisibleMenus returns number of currently visible menus. Ordinarily this is going to be 1 if a menu is showing and 0 if not.
string Items[#] returns the Itemname specified by Index
Name returns the name of the menu or the first item's name.
To String If no menu open, returns "No Menu Open"

Inherits window

You may also use members of window, shown here: [ Toggle ]

Type Member Description
action DoClose Does the action of closing a window
DoOpen Does the action of opening a window
LeftMouseDown Does the action of clicking the left mouse button down
LeftMouseHeld Does the action of holding the left mouse button
LeftMouseHeldUp does the action of holding the left mouse button up
LeftMouseUp Does the action of clicking the left mouse button up
Move[x,y,width,height] Moves window to specified location and size.
RightMouseDown does the action of clicking the right mouse button
RightMouseHeld Does the action of holding the right mouse button
RightMouseHeldUp Does the action of holding the right mouse button up
RightMouseUp Does the action of clicking the right mouse button up
Select Selects the specified window
SetAlpha[0-255] Sets the alpha/opacity
SetBGColor[argb] Sets the window color
SetCurrentTab[#|name] If the window is a TabBox, set the current tab by index or by name.
SetFadeAlpha[0-255] Sets the faded alpha/opacity
SetText Set text to an edit box
argb BGColor Background color
bool Checked Returns TRUE if the button has been checked
Children Returns TRUE if the window has children
Enabled Returns TRUE if the window is enabled
Highlighted TRUE if the specified window has focus
HisTradeReady Has the other person clicked the Trade button?
Minimized Returns TRUE if the window is minimized
MouseOver Returns TRUE if the mouse is currently over the window
MyTradeReady Have I clicked the Trade button?
Open Returns TRUE if the window is open
Siblings Returns TRUE if the window has siblings
float Value for gauges
int Child
CurrentTabIndex TabBox: Returns the index of the currently selected tab.
FirstChild
GetCurSel Index of the currently selected/highlighted item in a list or treeview
Height Height in pixels
HScrollMax Horizontal scrollbar range
HScrollPct Horizontal scrollbar position in % to range from 0 to 100
HScrollPos Horizontal scrollbar position
Items Number of items in a Listbox or Combobox
Next
Parent
Style Window style code
TabCount TabBox: The number of tabs present in the TabBox.
VScrollMax Vertical scrollbar range
VScrollPct Vertical scrollbar position in % to range from 0 to 100
VScrollPos Vertical scrollbar position
Width Width in pixels
X Screen X position
Y Screen Y position
string List[#, y] Get the text for the #th item in a list box. Only works on list boxes. Use of y is optional and allows selection of the column of the window to get text from.
List[text, y] Find an item in a list box by partial match (use window.List[=text] for exact). Only works on list boxes. Use of y is optional and allows selection of the column of the window to search in.
Name Name of window piece, e.g. "ChatWindow" for top level windows, or the piece name for child windows.


Note: this is Custom UI dependent
ScreenID ScreenID of window. Note: This is not Custom UI dependent, it must be the same on all UIs
Size Returns Y,X size of window in pixels
Text Window's text.

STMLBox: returns the contents of the STML.

Page: returns the name of the page's Tab.
Tooltip TooltipReference text
Type Type of window piece (Screen for top level windows, or Listbox, Button, Gauge, Label, Editbox, Slider, etc)
window Child[name] Find a child window with the provided name
CurrentTab TabBox: Returns the Page window associated with the currently selected tab.
FirstChild[name] First child window
Next[name] Next sibling window
Parent[name] Parent window
Tab[#|name] TabBox: Looks up the Page window that matches the provided index or tab text.

Examples

/invoke ${Menu.Select[open the door]}

  • Clicks the menu item "open the door"

/echo ${Menu.Name}

  • Output: Shabby Lobby Door

/echo ${Menu.Open}

  • Output: TRUE

/echo ${Menu.NumItems}

  • Output: 4

/echo ${Menu.Items[2]}

  • Output: Adjust Placement

See also