Sign in to follow this  
Switch

Disable Buttons?

Recommended Posts

Hi,

Is there a way to disable buttons or descriptive text on the page when a sequence is running?

Basically, I am making a cycling program which turns my device on and off for a preset time. I have a start/stop button which stops the sequence after it finishes the cycle. But during that time, I can press it again and it will continue to run. I want to disable that, along with a few other buttons on the page, and let the cycle finish. I couldn't find anything about disabling buttons in the manual.

Share this post


Link to post
Share on other sites

I typically do just about every action as a Quick Sequence action. That way I have total control. In this case, instead of using begin/end sequence which will toggle the sequence, I would create a Quick Sequence action with:

beginseq(mysequence)

This means the button will only start the sequence, not stop it. If the sequence is already running, it won't do anything.

In the bigger picture, if you want to disable a button you need to use a variable and if() statement in the quick sequence.

if (OKtoRun)
   dosomething()
endif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this