Sign in to follow this  
Hemendra

Momentary Push Button

Recommended Posts

Using BUTTON from tool box, we are able to toggle value between 0 and 1, its toggle button. I need Momentary push button, means it writes 1 value to channel up to kept it pressed. as soon as released it, channel valued should turn to zero. Also wanna to show different text for value 0 and 1. How can I make this?

Share this post


Link to post
Share on other sites

Use two actions on the same button.  Both should be quick sequence actions.  The first one would have the "On Mouse Down" checkbox that appears when you select Quick Sequence checked.  That one would have script like:

myChannel = 1
strCaption = "ON!"

Then the second action would not have On Mouse Down checked and would have:

myChannel = 0
strCaption = "Off"

Note if you want the button text to change if the channel changes outside of the button press, you either need to add it to script, or you can use a blank button, and then overlay a Descriptive Text Component on top of it.

Share this post


Link to post
Share on other sites

Using simply myChannel =1 as a Quick Sequence #1

and myChannel =0 as Quick sequence #2

I was not implement this in version 18.1

must be missing something.  Any help appreciated.

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