Tree info
Well, you can’t click anywere, just see the tree of items, their name (or type) and the id.
Hey, I made this in 30 minutes. Not bad 😀
Just run it from where you want. By default it will also replace the output log with the information. comment the bottom line to avoid this (add // at the beginning of the sentence)
WARNING: If you have a loooooot of items it could crash, but I’m almost sure you don’t have as much as I have. 😉
————————–
var str = “List:”;
var str2 = “”;
function addToStr(cont,h){
var items=cont.getItems();
var l = items.getLength();
for(var i = 0;i var item = items.getAt(i); var type = item.getType(); str+=h+ ( type==”Shortcut” || type == “Folder” ? item.getLabel() : “{“+type+”}” ) ; if( item.getType()==”Panel” || item.getType()==”Folder” ) { str+=”¦ Id:” + item.getId() + “\n”; addToStr(item.getContainer() , h+” ¦”); }else{str+=” Id:”+ item.getId() + “\n”;} } } var desktops = LL.getAllDesktops(); var len = desktops.getLength(); for(var j = 0 ; j var desktop = LL.getContainerById(desktops.getAt(j)); str+=”\n”+desktop.getName()+” Id:” + desktop.getId() + “\n”; addToStr(desktop , ” ¦” ); str2+=str; str=””; } var appdrawer = LL.getContainerById(99); str+=”\nApp drawer Id:99\n”; addToStr( appdrawer , ” ¦” ); LL.writeToLogFile(str2+str, true ); //this will add the string to a file, true to clear before, false to append alert(str2+str); //this will display the tree in one popup (alert)
< ![CDATA[
There is a writeToLogFile function. Maybe it’s better to use that.
]]>
< ![CDATA[
Yes, true….But it’s funny to see the looong list in the alert 😀
I can modify it…
]]>
< ![CDATA[
done. I know it can write in each iteration, to avoid overload (I had while testing, that’s why there are two strings) but…it’s easy.
]]>