With Macro PHP, is it possible to mix 2 functions in one control button

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • With Macro PHP, is it possible to mix 2 functions in one control button

    Hello palodaters,

    sorry for my question, but i'm a complete newbie to Php programming function.

    My own is very simple, I would like put in a celle "2" and 1 sec later (or two or three, never mind) "1". This with only one control button.
    See below my Php Macro :
    forum.jedox.com/index.php/Atta…e2ff3f00d3c6ec1a18b62eb12
    With this, I need two buttons : one for function Hide and another for function Unhide.
    I have tried to put a function sleep (1s), but it didn't work.

    So, How I can "mix" the functions to have a single control button ?

    Any hint is appreciable.
    Sorry for bad English.

    Thanks in advance, have a nice day.
    Images
    • php macro.png

      13.36 kB, 873×357, viewed 421 times

    The post was edited 1 time, last by belgarion ().

  • I'm not the best with the macro language, but you can only assign (I believe) 1 function to a button. You would need to combine the 2 functions (Hide & unhide) into 1.

    I'm not familiar with using a sleep/stall command in PHP ( I assume you want something to "blink") However for a single hide/unhide toggle you could run something like (in correct PHP format):

    IF $range = 1
    $range -> value = 2
    else
    $range -> value = 1
  • Thanks zprs34,

    I have tried your macro, but it's not my own. The cell became "1" but I can't put 2 after for have a rotation.

    zprs34 wrote:

    you can only assign (I believe) 1 function to a button.

    Like you said before, my demand is not possible. I saw "Laloune" confirm this fact in another thread.
    I will use 2 two control buttons.

    Regards,
    Bel.

    The post was edited 1 time, last by belgarion ().