to determine the button is pressed or not pressed
Hi!
How can I determine the button is pressed (clicked, released) or not pressed (not clicked, not released) with help of script?
Post edited by YudinEd on
You currently have no notifications.
Hi!
How can I determine the button is pressed (clicked, released) or not pressed (not clicked, not released) with help of script?
Licensing Agreement | Terms of Service | Privacy Policy | EULA
© 2025 Daz Productions Inc. All Rights Reserved.
Comments
You need to create a function to handle button presses and use the Connect function to link it to the clicked() signal for the button - which is emitted when the button is presed and released. The function could do whatever you want, from simply setting a variable to indicate that the press occured to reconfiguring the dialogue or data state. http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start
Hi, Richard Haseltine!
I'm glad you answered me.
I understand sense, but unfortunately badly I know the script syntax. How to link the letters into a single whole :)
A small script example would help me ( even untested).
I'm trying to do it:
Button is pressed (finger on the button ) and I have an infinite action. The button is released (remove your finger from the button) - action stops
So I have 2 strings
I think that correctly understand the logic -
if true (button pressed) then function myPressedFunction
else (false) then function myReleasedFunction.
I tried different variants (I will not give examples, so you do not laugh
), but I could not keep track when removed finger from the button - the action does not stop.
Please little exаmple . Thank you in advance
I think you need something to keep the incremnts happening separate from the button actions - I added a DzTime (using the code snippet from the Connect documentation in the DS3 docs as a starting point and this seems to work:
Timer!
It is a good idea and works perfectly. My thanks.