I’ve reworked my drawer, which I shared here https://plus.google.com/115366157037831519359/posts/ijJtMSQVJB1 with…
Posted by: pierrot | on December 20, 2014
I’ve reworked my drawer, which I shared here https://plus.google.com/115366157037831519359/posts/ijJtMSQVJB1 with the new beta feature: Colorize icons.
The script in the first comment is set to resumaed and paused event of every folder.
]]>Posted in | 11 Comments »
Tags:
< ![CDATA[
var e=LL.getEvent();
var c=e.getContainer();
var width=5;
var editor=c.getOpener().getProperties().edit();
var enter=LL.getEvent().getSource()==”C_RESUMED”;
editor.setInteger(“s.labelFontColor”,enter?0xffff0000:0xff000000);
editor.setInteger(“s.iconColorFilter”,enter?0xffff0000:0xff000000);
editor.commit();
if(enter)
{
var items=c.getItems();
var labels=[];
for(a=0;a
{
var i=items.getAt(a);
labels.push(i.getLabel());
i.setName(i.getLabel());
}
labels.sort(noCaseSort);
LL.writeToLogFile(labels,false);
for(b=0;b
c.getItemByName(labels[b]).setCell(b%width,Math.floor(b/width),b%width+1,Math.floor(b/width)+1);
}
function noCaseSort(a,b)
{
if(a.toLowerCase()>b.toLowerCase())return 1;
if(a.toLowerCase()
return 0;
}
]]>
< ![CDATA[
I like the idea, but where do you need a script ?
]]>
< ![CDATA[
For two things:
1. Arrange all items in the folder alphabetically
2. To make the currently opened folder icon and label red.
]]>
< ![CDATA[
oh, great
]]>
< ![CDATA[
Wow, that’s really nice.
That script does what I’ve wanted and TRIED to do in various (messy) ways.
]]>
< ![CDATA[
for some reason i get a null error on line 4
]]>
< ![CDATA[
That happens if the script is not run in a folder.
]]>
< ![CDATA[
ah but it was run in a folder. i failed to mention that, my bad
]]>
< ![CDATA[
Check for unnecessary line feeds in there… This is weird.
]]>
< ![CDATA[
im redoing my folder just to be sure. i may have placed the script in the wrong menu by mistake and didnt realize it
]]>
< ![CDATA[
turns out i had to hit folder options, not customize.
]]>