menu Get
menu Get puts the value of a control in #MenuRes:
| Control | #MenuRes |
|---|---|
| Edit | The text. |
| Memo | The text, with each line break turned into $. |
| Check | -1 (#true) when checked, 0 (#false) when not. |
| Combo, List | The number of the selected entry, counting from 1; 0 when none. |
| Text, Button, anything else | N/A. |
A name that does not exist also gives N/A. If several controls share a name, the first one is read.
Clicks need no menu Get: they go to #MenuButton by themselves.
Example
Section titled “Example”menu Clearmenu Window Size 180 110menu Edit pet 10 10 150 Fluffymenu Check feed 10 40 150 20 #true Feed itmenu Button ok 10 75 60 25 OKmenu Showset #MenuButton N/Awhile #MenuButton = N/A wait 1menu Get petset %petname #MenuResmenu Get feeddisplay ok Pet %petname feed #MenuReshalt1.5 and 1.6
Section titled “1.5 and 1.6”- 1.6: also reads radio buttons:
-1when checked,0when not. It reads the control the name belongs to; in 1.5, the first control with that name. Labels, buttons and images giveN/Ain both.
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.