Skip to content

menu Get

menu Get {name}
Sets
#MenuRes

Also searchable as: 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.

menu Clear
menu Window Size 180 110
menu Edit pet 10 10 150 Fluffy
menu Check feed 10 40 150 20 #true Feed it
menu Button ok 10 75 60 25 OK
menu Show
set #MenuButton N/A
while #MenuButton = N/A
wait 1
menu Get pet
set %petname #MenuRes
menu Get feed
display ok Pet %petname feed #MenuRes
halt
  • 1.6: also reads radio buttons: -1 when checked, 0 when not. It reads the control the name belongs to; in 1.5, the first control with that name. Labels, buttons and images give N/A in 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.