1 Reply Latest reply on Jul 13, 2012 9:40 AM by philmodjunk

    last button clicked indicator?



      last button clicked indicator?


      I intend to have 8 different buttons which will utilize the same script but will behave differently depending on what is clicked, so instead of having 8 separate scripts, is there a way I can indicate which button I had pressed (all 8 have been given a different name) so that when I start my script I could have something like:

      if ($$last_button_pressed = "Btn01Prev")

         (series of calculations)


      if ($$last_button_pressed = "Btn01Next")

        $$ReqRecType = 1

        (more calculations)


      if ($$last_button_pressed = "Btn10Next")

        $$ReqRecType = 10

        (more calculations)


        • 1. Re: last button clicked indicator?

          Since your buttons will all perform the same script, pass the name of the button as a script parameter. You can doubleclick a button to open button setup..., if perform script is not selected, selecte it. Click the specify button and you'll get  a dialog with an "optional script parameter" box where you can enter the name of the button.

          Then your script can look like this:

          Set Variable [$ButtonName ; value: Get ( Scriptparameter ) ]
          If [$ButtonName = "Btn0Prev"]

          Else IF [$ButtonName = "Btn01Next"]


          End If