using scripts how do I add an action to the list of actions?

using scripts how do I add an action to the list of actions?

]]>
(Next Post) »

4 Commentsto using scripts how do I add an action to the list of actions?

  1. Anonymous says:

    < ![CDATA[

    Use EventHandler.setNext. Actions are chained. You defined the first, then link to the next one. The last one has no next (it’s null).



    lightninglauncher.com – EventHandler

    ]]>

  2. Anonymous says:

    < ![CDATA[

    I want to add an action in the launch action – > list of action, but I can find how get that.



    I locate i.tap but is different



    I thing I’m a little lost

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Launch action is encoded in the intent (use Shortcut.getIntent()), but there’s no function to decode it from script.


    If possible, override it with the tap action. Try something like this (not tested for syntax errors):


    var props = item.getProperties();


    var h = props.getEventHandler(“i.tap”);


    h.setNext(new EventHandler(some_action, some_data);


    props.edit().setEventHandler(“i.tap”, h).commit();

    ]]>

  4. Anonymous says:

    < ![CDATA[

    tks I got it, this how finally I made



    var d = LL.getCurrentDesktop();


    var pnl = d.getItemByName(“pnl”);


    var items=pnl.getContainer().getAllItems();



    for (i in items){


    var intent = items[i].getIntent();


    var props = items[i].getProperties();


    // launch app


    var launchEH=new EventHandler(20, intent.toUri(0));


    var setVEH=new EventHandler(41,”pTop/$hideP”);


    launchEH.setNext(setVEH);


    var h = props.getEventHandler(“i.tap”);


    props.edit().setEventHandler(“i.tap”, launchEH).commit();


    }


    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *