Page 1 of 1

Locking CustomScript Buttons from Interaction

PostPosted: Tue Feb 23, 2016 7:03 pm
by chrisr
Hello All,
Hope all is well. I am trying to figure out a way to Lock a set of CS Buttons. These buttons will be in a toggle state, and I wish to be able to lock them from being inadvertently toggled on or off. Here is a screen shot. The premise is you would be able to toggle CS Button lock to lock out any input to the set of green buttons. I have tried a couple of things with no success.

Image

Thanks for any insight you all might have!

Best,

Re: Locking CustomScript Buttons from Interaction

PostPosted: Tue Feb 23, 2016 10:11 pm
by JustynR
Create a Textbox and add the following script to these buttons:

Code: Select all
WDTextboxAppend,ID,Value


Change the ID to the Textbox ID, and change the value to the button number.
Make an "Enter button" with this script in it:

Code: Select all
VGetTextboxText


Now compare this new variable with another that has the correct passcode.

Perhaps put a timeout on the enter button that will both clear the text box and the variable.

Re: Locking CustomScript Buttons from Interaction

PostPosted: Tue Feb 23, 2016 11:42 pm
by Dennis Kuypers
Hello,

You would need the IF-Statement to check if your button is unlocked or locked (use a variable). In the if statement you can control if your code is executed or not. You can not prevent the button from going into the other state (pressed or released) but you can revert it easily (also within your IF statement).

I think the scripts required to revert back to the state it was before (without triggering the actual script) are:
WDCustomScriptSilentClickToggle
WDCustomScriptSilentReleaseToggle

Does that help?

Regards
Dennis

Re: Locking CustomScript Buttons from Interaction

PostPosted: Tue Mar 01, 2016 9:40 pm
by chrisr
Dennis, yes that helped. Thanks!