Ahh I see..
To add a button in your dashboard for this, go to Go to Mach\Profile\{Profile name}\ Macros\Scripts.
Here you will make a copy of UserGUIModuleDefault.mcs and rename the copy to UserGUIModule.mcs
In that script, you're going to go to the bottom You'll see some things about CreateUserCommands()
You'll just need something along these lines to add a dashboard button.
function UserGUIModule.CreateUserCommands()
local function RunM(code)
-- fire and return immediately; the m-code handles any waiting/prompting
w.api("mcCntlMdiExecute", inst, code)
end
w.CreateSimpleCommand("ATC") -- this creates the button and names it
w.CreateCommandActionOption("ATC", function() RunM("M132") end) -- this gives the button logic
end
There are some other advanced things you can do with it as well like w.CreateCommandFeedbackOption for providing feedback to another function, for example if I wanted 3 different buttons to toggle between eachother, I could use this function to handle the logic for that.
Short parameter example:
w.CreateCommandFeedbackOption("ATC", function() return UserGUIModule.IsM312() end)
Another option is if you want the button to change colors when toggled
w.SetCommandButtonColors("ATC", "#FF0000", "#00FF00")
A third optional function is if you want to change the label name as it toggles.
w.SetCommandButtonLabels("ATC", "M132 off", "M132 on")