#MenuButton
Also searchable as: #MenuButton · MenuButton · button clicked
#MenuButton is the name of the last menu button clicked, in capital letters. When the menu
window is closed, with its × or with menu Hide, it becomes CLOSED.
It keeps the last value until the next click, so set it to something else before waiting for a click. Comparisons ignore case.
Example
Section titled “Example”menu Clearmenu Window Size 160 45menu Button ok 10 10 60 25 OKmenu Showset #MenuButton N/Awhile #MenuButton = N/A wait 1if #MenuButton = closed display ok You closed the window.else display ok You clicked #MenuButtonhalt1.5 and 1.6
Section titled “1.5 and 1.6”| 1.5 | 1.6 | |
|---|---|---|
| A button click | the name in capitals | the name in lower case |
| The window’s × | CLOSED |
CLOSED for the main window; another menu Form gives its own name |
menu Hide |
CLOSED |
unchanged |
menu Clear |
unchanged | emptied |
| A script starting | unchanged | emptied |
In 1.6, setting it to form0 reads back as CLOSED. See
MENU: EasyUO 1.5 and 1.6.
See also
Based on the EasyUO wiki, edited for EasyUO Reforged. This text is available under the GNU Free Documentation License 1.2.
The EasyUO 1.6 behaviour on this page was researched with help from the ScriptUO community: Gaderian's tutorial New Menu Code and how to adapt old scripts and the scripts its members share at scriptuo.com.