Graphics

 View Only
  • 1.  Increment Limits

    Posted 02-15-2023 06:46

    Hi,

    I have a button in dashboard that increments to the numerical value of 1 each time the button is pushed. How do I apply an end limit so it doesn't surpass the highest number I require? The same in going back to zero. At the moment I can't stop it going to minus figures, when I want it to stop at zero. 

    made using increment param in ogScript.

    Thank you



    ------------------------------
    Brad Howard
    ------------------------------


  • 2.  RE: Increment Limits

    Posted 02-15-2023 06:57

    This might not be the best way but I have this for exactly the same issue. 

    This goes from 1 to 9 and back to 1. 

    if (params.getValue('YOUR PARAM', 0)  <  9)
    {
        params.setValue('YOUR PARAM', 0, (params.getValue('YOUR PARAM', 0) + 1));
    } else {
        params.setValue('YOUR PARAM', 0, 1);
    }



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 3.  RE: Increment Limits

    Posted 02-15-2023 07:21

    Where would i apply that into my already script?



    ------------------------------
    Brad Howard
    ------------------------------



  • 4.  RE: Increment Limits

    Posted 02-15-2023 07:24

    I don't know what your script is but that's my entire script needed to do similar to what you asked. 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------