Please suggest the command
to reset the slider values when a slider value attains 2?
how to control a button by using a slider value?
Maybe you are looking for something like in the attachment.
(otherwise explain more details, especially the context)
to ask a value of a slider (min< value < max) is never exact (can be instabile) because
- the slider can jump over this value
- the time to call the script can be too short
The attached file may help, although I'm not exactly sure what you're wanting.
When 'slider' value is 2 the slider resets to 0; see slider Update script line 1.
The 'button' caption is changed based on the slider value; see slider Update script line 2.
The result of clicking the button changes based on the slider value; see the 'button' On Click script.
Note that these scripts could be written different ways also, for example using the Execute command, an example is given in the attached as part of the text.
If you want to show or hide a button completely based on a slider value, that is not in the attached file but it's possible, for example by going to Preferences for the button, to the Advanced tab, and setting the Condition to Show Object to include a value or interval for the slider, such as 'slider <=1' where 'slider' is the name of the slider.
Let me know if you I might be able to help further.
Comments have been locked on this page!