Hello, I want to open a folder with a script.

Hello, I want to open a folder with a script. When the folder is open a wallpaper should be set (a blurred picture). If the folder is closed another wallpaper should be set (same but not blurred). I tried the whole day to write the script but now my brain is Mousse au Chocolat 🙂 .

Can someone help please?

thx

]]>

18 Commentsto Hello, I want to open a folder with a script.

  1. Anonymous says:

    < ![CDATA[

    Is your folder a full-screen one?

    ]]>

  2. Anonymous says:

    < ![CDATA[

    No, the folder slide in from the right of the screen. 240 x 800. I want to change the desktop background not the folder background.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Yes, I was going to suggest that 😉


    Changing the device wallpaper is not a good idea in my opinion. A full-screen item is how I will do it.


    Check this script by Lukas Morawietz​ https://github.com/F43nd1r/DimBackground/blob/master/app/src/main/res/raw/dimbackground.js (it is a github link because the script is packed in an app)


    Where it changes the properties of the editor, set the box background.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Thank you. But this script is the cherry for my mousse (smile) . Maybe i could create an object with a blurred picture with the full screen size 480*800. This object can be set visible true/false on open/close folder.?

    ]]>

  5. Anonymous says:

    < ![CDATA[

    That’s a good idea

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Ok, but how do i open a folder with a script. And if i start an app from the folder , the folder closes, how to make the fullscreen object invisible. I dont understand how i have to use “isVisible()” or “isOpen()”


    ?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Use instead the resumed and paused event of the folder itself


    The easier way is:



    Resumed event: LL.getItemById(??).setVisibility(true);



    Paused event:


    LL.getItemById(??).setVisibility(false);

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Thank you, i try it tomorrow.

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Hi, cant sleep…


    I get an error:


    missing ) after argument list



    This is the line


    LL.getItemById(00003d).


    setVisibility(true);



    Whats wrong?

    ]]>

  10. Anonymous says:

    < ![CDATA[

    😉



    LL.getItemById(0x00003d).


    setVisibility(true);

    ]]>

  11. Anonymous says:

    < ![CDATA[

    Wow, thx! It looks great. Is it possible to set a fade in and out for the object with the blurred picture?

    ]]>

  12. Anonymous says:

    < ![CDATA[

    Yes, but you will need a more complex script…like the one in the link 😉



    However there is a different way to do that, with bindings.



    1) set the resumed event to change a variable to 255


    2) set the paused event to set that variable to 0


    3) set the alpha binding of the item to


    animate(“$thevariable”)


    where thevariable is the variable you choose on previous steps


    4) set the visibility binding of the item to


    animate(“$thevariable”)==0?0:1



    Not tested, if it doesn’t work ask

    ]]>

  13. Anonymous says:

    < ![CDATA[

    Hello, i did everything you wrote. The only effect is, my object is invisible. Becomes visible in the editor, after closing the editor it disappears. I have to reload my previous settings (glad to have a backup) . Maybe my fault is the definition of the variable. I set the it like this


    var myalpha=”255″



    In the bindings


    animate(“$myalpha”)


    I put the last line in point 4 , exact as you wrote it.


    I dont understand why ==0?0:1

    ]]>

  14. Anonymous says:

    < ![CDATA[

    No no, forget about scripts, this is a different thing.


    You don’t need to use run a script, you need to use set a variable.



    The ==0?0:1 means “is the alpha 0? Then disable the item. It is not? Then enable it.



    It is the same as:



    if(animate(“$thevariable”)==0) return 0;


    else return 1;

    ]]>

  15. Anonymous says:

    < ![CDATA[

    Ok, thx.


    Btw, the object with the picture can also set as a transparent color, so i can use it as “backround-dimmer” if a folder is open. Great!

    ]]>

  16. Anonymous says:

    < ![CDATA[

    Where and how must i set the variable?

    ]]>

  17. Anonymous says:

    < ![CDATA[

    Launch a shortcut, lightning launcher, set a variable, write the name of the variable, write the value of the variable

    ]]>

  18. Anonymous says:

    < ![CDATA[

    YES, thank you! Now everything is working. I read the help about bindings. The part how to set the varables. I copied and modified the example.


    This works.



    var editor = LL.getVariables().edit();



    editor.setInteger(“myalpha”, 255);



    editor.commit();



    Thanks again for your patience 😉

    ]]>

Leave a Reply

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