Helllo
Helllo,
how can I get an `id` of shortcut which I placed on my desktop?
I want to launch that shortcut via scripting API like this:
`LL.getItemById(id).launch();`
…but I don’t know an `id`.
Thanks for answers 🙂
]]>« How could I trigger a desktop change when my phone enters car mode? (Previous Post)
(Next Post) I’m new to Lightning Launcher ( got llx) »
< ![CDATA[
//I use this frequently
//check the box for item menu..
//Then just long click the item>scripts>[whatever you call it]
var e=LL.getEvent();
var did=LL.getCurrentDesktop().getId();
var cid=e.getContainer().getId();
var iid=e.getItem().getId();
alert(“desktop id = “+did+
“\ncontainer id = “+cid+
“\nitem id = “+iid);
]]>
< ![CDATA[
That’s brilliant, thank you! 🙂
]]>
< ![CDATA[
No problem.. You can also use the container menu> items> hierarchy.. And that shows the ID of items but they are in hex.. So you have to use 0x at the beginning
]]>
< ![CDATA[
Also another way to access an item is to use the label, this way you will get rid of possible id changes (an id will change if moved to another desktop, panel or folder). But a label is not required to be unique.
]]>