(Sorry my English is bad)

(Sorry my English is bad)

Hello!

I want to make a short script, but soon I faced a problem.

To understand how the box script works, I just pasted the example in the sctipt.api page

( http://www.pierrox.net/android/applications/lightning_launcher/script/reference/net/pierrox/lightning_launcher/script/api/Box.html)

and added a variable that I want to changing the color, like followings:

——-

var item=LL.getContainerById(1).getItemByLabel(‘test’);

var color = 0xff00ff00; // pure green

 var editor = item.getProperties().edit();

 var box = editor.getBox(“i.box”);

 

 box.setColor(“c”, “ns”, color);

———

But it did not work although it had any error!

Can i figure it out what is the problem(s)?

Thank you!

]]>

2 Commentsto (Sorry my English is bad)

  1. Anonymous says:

    < ![CDATA[

    You forgot at the end


    editor.commit();


    That line is the one that actually tells the launcher to show the changes

    ]]>

  2. Anonymous says:

    < ![CDATA[

    TrianguloY Omg I have totally ignored last part in the example for a few hours.. Now it works! Thank You!

    ]]>

Leave a Reply

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