Is there a way to set two or more variables in one click?

Is there a way to set two or more variables in one click? Like when I click action it will set variable A to 1 and variable B to 0? Thanks and God bless!

]]>

4 Commentsto Is there a way to set two or more variables in one click?

  1. Anonymous says:

    < ![CDATA[

    You could do it with a really simple script using the setVariable methods found at http://www.lightninglauncher.com/scripting/reference/api/reference/net/pierrox/lightning_launcher/script/api/LL.html



    So for example:


    LL.setVariableFloat(“var1”, 0.5)


    LL.setVariableBoolean(“var2”, false)

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Sorry sir but I can’t really understand everything. I really don’t have a background about scripts. Huhuhu.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    What you need to do is find an app that should already be installed called “Script Editor” and open it. Slide from the left and create a new script and then name it whatever you want. The next step depends on what type of variables you want to change.



    If you want to change a number with decimals, which is a float in computer jargon, you want to use the float variant, so LL.setVariableFloat(“varname”, value)


    The other types are:


    Integer: a number without decimals


    Boolean: can only be true or false


    String: a set of characters so for example “this”



    After you have determined which variant you need just copy paste the variant in your script and change varname to the name of the variable you want to change (keep the quotation marks around it) and change value to the value you want the variable to get.



    You can put as many variants as you want below each other.



    The last thing you need to do is create a new item, select lightning action, select run script and choose the script you just made.



    I hope you understand now, but if you don’t tell me where you get stuck and I’ll try to explain better 🙂

    ]]>

  4. Anonymous says:

    < ![CDATA[

    i’m so amazed on how you guys can do everything in LL with codes. i really don’t know how to code and i’m not an IT major, so poor me. haha. but thanks guys. you’ve been a great help!

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *