Scripting confuses the fuck outta me :( can anyone gimme a hand in learning how to use it and write me a script to…

Scripting confuses the fuck outta me 🙁 can anyone gimme a hand in learning how to use it and write me a script to do this.

Set a shortcut to lock/do nothing on the desktop, position it at the top of the screen then resize it to match the screen width and finally set the item background to a color any color red,green,blue doesn’t matter.

Comments in the script would be nice but not necessary, I’m grateful for any help I can get with this cheers.

]]>
« (Previous Post)
(Next Post) »

5 Commentsto Scripting confuses the fuck outta me :( can anyone gimme a hand in learning how to use it and write me a script to…

  1. Anonymous says:

    < ![CDATA[

    You can get an item through several means. One is to get it through the event, assuming you the script is run for this item:


    var item = LL.getEvent().getItem();



    A lots of things revolves around the PropertySet object. (follow the link for the properties that can be read and written)



    You access the properties this way:


    var properties = item.getProperties();



    Then you can query a property (assume the item is a shortcut):


    alert(properties.getInteger(“s.labelFontColor”));



    Or you can change it:


    var editor = properties.edit();


    editor.setInteger(“s.labelFontColor”, 0xffff0000);


    // edit more properties here


    editor.commit(); // when you’re done



    You can get the container (desktop or folder or panel) for an item this way:


    var container = item.getParent();



    Then get the size of the container:


    var width = container.getWidth(); // or getHeight();



    Or get the number of columns


    var columns = container.getProperties().getInteger(“gridPColumnNum”);



    You could set this width to the the item (detached from the grid)


    item.setSize(width, height)



    Or if on the grid:


    item.setCell(0, 0, columns, 1);



    http://www.pierrox.net/android/applications/lightning_launcher/script/reference/net/pierrox/lightning_launcher/script/api/PropertySet.html

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Nice one! I’ll have a mess about with this when I finish work 🙂 you should move it to Tutorials or sticky it or something so its easier for noobs to find, I screenshotted it anyway but it would be a shame for it to get buried especially after you took the tym to type it all out for me.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Maybe some wiki entry…

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Yeah or that

    ]]>

  5. Anonymous says:

    < ![CDATA[

    James Coyle​

    ]]>

Leave a Reply

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