#✅ | Making a button change variables to true or false
1 messages · Page 1 of 1 (latest)
You can do that with a button action script:
- Make sure the variable exists via Customization → Variables → Manage Variables (see the Variables page).
- In the layout editor, right-click your button and choose Edit Action Script.
- Add an action: Set Variable Value (FM Variable) and enter
yourVariableName:true(or:false), then save. - If you want the button to toggle between true/false, wrap the actions in an
IF / ELSEblock that checks the current state (use Is Variable Value requirement withgetvariableplaceholder) and set it to the opposite value in each branch.
Let me know if you’d like a concrete toggle script example 😊
The IF / ELSE option is greyed out
The IF / ELSE options aren’t standalone buttons—FancyMenu wants you to add them from the action script context menu instead. While you’re inside the action script editor, right-click the big dark-grey area (not on an action entry) and choose Add → IF Statement (or ELSE/ELSE-IF). That’s also how you add actions inside those statement blocks.
If the option is still greyed out after that, let me know what exactly you clicked and what entry is selected—we can figure out what’s blocking it 😊
Reference: Action Scripts