Skip to content

openMenu

MicroBlaster edited this page Nov 10, 2019 · 2 revisions

Purpose: Activates an existing script menu or TWX Terminal Menu option.

Syntax: openMenu {name} {pause}

{name}: The name of an existing menu to activate.

{pause}: Optional 2nd parameter, must be 'TRUE' or 'FALSE'. A Value of 'FALSE' causes the menu to display but not pause.

Notes: This command will activate (or open) a script or TWX Terminal Menu option.

Menus can be created with the 'addMenu' command, and closed using the 'closeMenu' command.

Example:

openMenu TWX_LISTACTIVE FALSE

addMenu "" "BuyDown" "BuyDown Settings" "." "" "Main" FALSE
addMenu "BuyDown" "GO" "GO!" "G" :Menu_Go "" TRUE
addMenu "BuyDown" "Product" "Product" "P" :Menu_Product "" FALSE
addMenu "BuyDown" "TurnLimit" "Turn limit" "T" :Menu_TurnLimit "" FALSE
addMenu "BuyDown" "Quantity" "Quantity" "U" :Menu_Quantity "" FALSE
addMenu "BuyDown" "Haggle" "Haggling" "H" :Menu_HaggleFactor "" FALSE

gosub :sub_SetMenu

openMenu "BuyDown"

Clone this wiki locally