Using the file in a script
As it is
Section titled “As it is”A saved file runs as it is. Its header builds every form, waits for a click or for a window to be closed, and stops:
menu reforge mode 1.6gosub menu_form0set #MenuButton N/Awhile #MenuButton = N/A wait 1halt
sub menu_form0 menu delete ok menu window title Ready menu window size 160 50 menu window color BtnFace menu setdef parent form0 menu font name Arial menu setdef fontsize 10 menu setdef fontstyle 0 menu font color Black menu font bgcolor BtnFace menu setdef alignment 0 menu button ok 40 12 80 25 OK menu show 100 100returnIn your own script
Section titled “In your own script”Copy the subs, from the first sub menu_ to the last return, to the end of your script, and:
- Put
menu reforge mode 1.6at the top of your script. It chooses the 1.6 MENU system for the whole run, and it works only in the main script: the one you press Play on, not one it calls. Seemenu Reforge Mode. (A script that already usesmenu Form,menu SetPropor another 1.6-only sub-command gets 1.6 without it, but the line makes it certain.) gosubthe subs where the windows are needed. Calling one again rebuilds its form.- Read what the user did with
#MenuButton(the name of the button clicked, or of the form closed,CLOSEDforform0), and the controls withmenu Get.
menu reforge mode 1.6gosub menu_form0set #MenuButton N/Awhile #MenuButton = N/A wait 1if #MenuButton = ok{ menu Get loot display ok Loot corpses: #MenuRes}halt
sub menu_form0 menu delete loot menu delete ok menu window title Loot menu window size 180 70 menu window color BtnFace menu setdef parent form0 menu font name Arial menu setdef fontsize 10 menu setdef fontstyle 0 menu font color Black menu font bgcolor BtnFace menu setdef alignment 0 menu check loot 10 10 160 20 #true Loot corpses menu button ok 50 38 80 25 OK menu show 100 100returnTo edit the windows later, open your script in the designer: it reads the menu lines and ignores the
rest. Save the result under another name and copy the subs back, because saving over your script would
replace it with the windows alone (the designer warns you; see Saving over a script).