Locking CustomScript Buttons from Interaction

Moderator: Moderator Group

Locking CustomScript Buttons from Interaction

Postby chrisr » Tue Feb 23, 2016 7:03 pm

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,
Thank You

ChrisR
SurfacePro3 - 2GHz i5 - 4GB ram - Windows 10 Pro - WD Pro 4.7 Rev2500 and WD v6
Sager Laptop - Intel 2.4GHz i7 3630QM - 16GB ram - Windows 7 Pro Svc Pack1 - Offline Manager v6
chrisr
 
Posts: 143
Joined: Tue Jan 26, 2016 10:50 pm

Re: Locking CustomScript Buttons from Interaction

Postby JustynR » Tue Feb 23, 2016 10:11 pm

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.
Justyn Roy
Field Application Specialist
Christie Digital
Toronto Ontario Canada
JustynR
 
Posts: 555
Joined: Wed Mar 25, 2009 1:33 am
Location: Toronto, Canada

Re: Locking CustomScript Buttons from Interaction

Postby Dennis Kuypers » Tue Feb 23, 2016 11:42 pm

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
Dennis Kuypers
Product Developer, Software

Online Manual
User avatar
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm

Re: Locking CustomScript Buttons from Interaction

Postby chrisr » Tue Mar 01, 2016 9:40 pm

Dennis, yes that helped. Thanks!
Thank You

ChrisR
SurfacePro3 - 2GHz i5 - 4GB ram - Windows 10 Pro - WD Pro 4.7 Rev2500 and WD v6
Sager Laptop - Intel 2.4GHz i7 3630QM - 16GB ram - Windows 7 Pro Svc Pack1 - Offline Manager v6
chrisr
 
Posts: 143
Joined: Tue Jan 26, 2016 10:50 pm


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 5 guests