Universe on/off button for dmx output to fog machine

Hi Bob,
Could you please post a sample here of:

A Button in the universe to toggle (on/off),
DMX output to 2 channels of dmx for Fog machine use?

I have gotten halfway there with simple dmx output script, but I cannot figure out how to turn off dmx output, once the same button is clicked again/ toggled to off.

What I would personally do, is use 1 sliders for smoke.

Create a new slider in universe with PangoScript
DmxOut 1, extvalue (0,255)
for dmx channel 1

Create a new slider in universe with PangoScript
DmxOut 2, extvalue (0,255)
for dmx channel 2

You can replace the number with any other dmx channel.

The advantage is that you do not need to make a toggle script.
A toggle requires a button to have multiple positions which makes the script much more complex.
Thanks! Will give it a Go.

The fog machine is an MDG which requires also a heater to remain on at all times for readiness, I suppose I can just add an ON button for that?
Try this under 1 slider:
DmxOut 1, 255
DmxOut 2, extvalue (0,255)
This should also work.

What will happen is every time you touch the slider, the machine on the first channel will receive an on signal. DMX channel 2 will receive the value of the slider you are sending it with. The only consequence is that you cannot turn off the machine with this slider. And to send the on signal, you need to touch the slider once.