request:
Posted by: pierrot | on April 8, 2014
request:
i have folder with some items (widgets and shortcuts). I need after click to widget automatic close folder. I set for this widget (switch) gesture for tap (close folder). This is ok.
But i need too… if i tap to some app shortcut from this folder, doing 1) run app, 2) close this folder.
Can somebody doing script for this? Thanks
]]>Posted in | 7 Comments »
Tags:
« How about another snapping option – snap to grid/cells? (Previous Post)
(Next Post) Another scripting question – or maybe feature. »
< ![CDATA[
This will only work if it is placed on items inside a folder.
Did not test prior to posting.
var e = LL.getEvent();
e.getItem().launch();
e.getContainer().getOpener().close();
]]>
< ![CDATA[
Thank you very much, working well.
]]>
< ![CDATA[
Bogdan Tautu , TrianguloY
Please help with script…
similar task as in the first post… but items is in panel. (some item in panel named “pokus”, panel “pokus” in folder named “hokus”). I need after start app, automatically close folder “hokus”.
]]>
< ![CDATA[
Not tested!
var e = LL.getEvent();
e.getItem().launch();
e.getContainer().getParent().getOpener().close();
If you want to launch the app with a delay replace e.getItem().launch(); with
*setTimeout(function(){e.getItem().launch(); }, 200);*
]]>
< ![CDATA[
thanks, both working 🙂
]]>
< ![CDATA[
Bogdan Tautu containers have a built in function to get the parent.
So c.getOpener().getParent() is the same as just c.getParent() [c is the container]
😉
]]>
< ![CDATA[
ok. I updated my post. Did not know. Thanks.
]]>