1.7.X | Button Scripts


As of version 1.5, FancyMenu supports multiple button actions per button.
This is possible by creating a button script containing all button actions you want to run by clicking the button.

Creating a Script

Buttons scripts are located in .minecraft/config/fancymenu/buttonscripts.
To keep it as simple as possible, button scripts are simple text files (.TXT files), allowing you to edit them with every text editor.

Creating a button script is very easy. It's basically just writing multiple button actions as list (one action per line).

The button action and its value (if there is one for the specific button action) are going to the same line, separated by colon (':').

A working button script to rename customization files and reload the menu (to switch between layouts by button click) can look like this:


The code above is all the script needs to work, nothing special. The part before the colon is the button action, everything after the colon is its value.
The reloadmenu button action has no value, that's why there's no colon on this line.

When you're done writing your script, just save it to the buttonscripts directory (mentioned above), with whatever name you like. Just be sure that it has the TXT file type.

After you've saved your button script, simply press the Reload button, to load the new button script into FancyMenu and you're done.

Using Button Scripts

Button scripts can be executed by using the runscript button action.
The value for this button action is the script file name without the file extension. So if you've named your button script myscript.txt, the button action value would be myscript.

NOTE: It's recommended to create layouts with the layout editor. You will then be guided through the whole process of creating objects, like a custom button that executes a button script.