Hi, i want to create item and set event, all by script.

Hi, i want to create item and set event, all by script. On long press execute another script (for example delete this item). How to do it?

2 Commentsto Hi, i want to create item and set event, all by script.

  1. Have a look at scripts in the wiki (http://www.lightninglauncher.com/wiki/doku.php?id=script_repository) for scripts that are doing similar things.

    Basically what you need is to use a method on a Container object (http://www.lightninglauncher.com/scripting/reference/api/reference/net/pierrox/lightning_launcher/script/api/Container.html) such as addShortcut, addPanel, etc. Then you can edit properties including events this way: some_item.getProperties().edit().setEventHandler(“i.longTap”, EventHandler.ZOOM_FULL_SCALE, null).commit()

  2. Thank you Pierre Hébert very much! Help a lot!

Leave a Reply

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