How do I set the script in the Positionchanged-event of a container?
How do I set the script in the Positionchanged-event of a container?
]]>
« One Punch Man theme in my KLWP + Tasker + Lightning Launcher Setup (Previous Post)
(Next Post) Hi. »
< ![CDATA[
//Helper function
handleEvent = function (item, name, action, data) {
item.getProperties().edit()
.setEventHandler(name, action, data)
.commit();
}
//Set the script yourscriptname to the desktop’s posChanged event
handleEvent(getEvent().getScreen().getCurrentDesktop(), “posChanged”, EventHandler.RUN_SCRIPT, getScriptByName(“yourscriptname”).getId());
]]>