‘Multi Container bookmark’

‘Multi Container bookmark’

This script will make a script that will set the position of all panels inside the desktop/folder in wich it was launched. [Not very difficult to understand, but you need to know how functions work.]

Instructions:

-Copy/paste this script as a new one. Check the ‘Appear in ligthning menu’ and/or ‘item menu’.

-Go to the desktop/folder, place all panels ( and the desktop/folder) as you want and run the script. [smoothly here means not instantly]

-Copy the output script and paste it as a new one.

Now you just need to launch that script.

You can comment suggestions, problems…

——————————————

var parent = LL.getEvent().getContainer() || LL.getCurrentDesktop();

if(parent.getId()==-1)parent=LL.getCurrentDesktop();

while( parent.getType()!=”Desktop” && parent.getOpener().getType()!=”Folder”){

    parent = parent.getParent();

}

function run(cont){

    var str = “LL.getContainerById(“+

    cont .getId() + “).setPosition(“+

    cont .getPositionX()+”,”+

    cont .getPositionY()+”,”+

    cont .getPositionScale()+”,”+animations+”);\n”;

    var items = cont.getItems();

    for(var i=items.getLength()-1;i>=0;–i){

        if(items.getAt(i).getType()==”Panel”){str+=run(items.getAt(i).getContainer() );}

    }

    return str;

}

var animations = confirm(“Do you want to go smoothly? (not instantly)”);

prompt(“Script to use: Copy, paste and run”,run(parent));

]]>

8 Commentsto ‘Multi Container bookmark’

  1. Anonymous says:

    < ![CDATA[

    TrianguloY, thanks man! It works great.


    Now, if I slide open multiple panels, one tap returns them all to home position.


    I can think of some great uses for this. Thanks again for your time doing this.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Oh. My. Gosh.


    This script is amazing!


    Thank you!

    ]]>

  3. Anonymous says:

    < ![CDATA[

    TrianguloY, this needs updating since 9.9.13. I was able to get it to work by substituting “Desktop” for “d” but I think there is another issue also? Thanks.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Yup. Thanks to say.


    Updated now

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Thanks dude. This is so handy and generic it should be in the repository.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    I plan to add all my scripts published here to the wiki once it becomes out of beta.


    The reason is that we can improve them and it’s easier to modify with beta changes.

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Hi fellas, can anyone show an example of how this works?

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Well, it just save the position (the scrolling/zoom) of all the panels to restore them with one click.


    Basically it lets you use multiple bookmarks of different containers at the same time, just try yourself.



    There was a screen in the ‘save your screens’ section of someone (can’t remember how the author, sorry) using it.

    ]]>

Leave a Reply

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