User Login
Name
Password
Site Contents
News
About
Download
Scripts
Tutorials
Register
Support
FAQ
Script Reference
New User


Contact Me
Xide
Online Scripting Reference

addMenu

Purpose
Adds a new TWX menu. This menu can be either an internal script menu or an addition to the TWX Terminal Menu.

Syntax
addMenu {parent} {name} {description} {hotkey} {reference} {prompt} {closeMenu}

{parent}: The name of the 'parent' menu this menu will be added to. If left blank, the menu will not be shown in the option list of any other menu in existance.

{name}: The name of the new menu being created.

{description}: The description of the menu being created. This description will be shown in the option list of the parent menu, and as a title for the new menu option list.

{hotkey}: The hotkey used to access this menu from it's parent menu.

{reference}: The script label reference to jump to when the new menu is activated.

{prompt}: The text to display inside the new menu prompt.

{closeMenu}: If TRUE, this menu will automatically close itself when it is activated. For sub-menus that contain their own list of options, this should always be set to FALSE.



Notes
TWX menus are a great way to configure scripts before they are run. Also, using this command it is possible to customise the TWX Terminal Menu and add your own options.

Every menu can have a near limitless number of options, and every option can link to a new menu.

Menus can be activated using the 'OpenMenu' command after they have been created.

Example
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"



Return to item listing