Thanks to Lukas Morawietz  I now can pass data from Tasker to a item label in Lightning Launcher.

Thanks to Lukas Morawietz  I now can pass data from Tasker to a item label in Lightning Launcher.

Made a very quick short tutorial for all my fellow noobs.

Because I cannot script myself and was looking for a tutorial for this.

http://www.youtube.com/watch?v=nnJQ5N8PXi8

10 Commentsto Thanks to Lukas Morawietz  I now can pass data from Tasker to a item label in Lightning Launcher.

  1. Arunkumar says:

    Thanks.. Will need this sooner or later. Lukas Morawietz  Can you help me with the Java equivalent of this bit?

    I need to run a lightning script and pass data to it via intent in the app I am working on.

  2. Evelien Wijbenga thanks for doing this – have also been looking to do this. I notice you had a clock script in your repository – do you have one for a digital clock by any chance?

    New to scripting as well … I want to animate the color/font size of the clock by touch, so I need to use labels controlled by Tasker as well. I can get the basic clock working fine, but can’t get the script to stop the clock looping when LLX is in the background (or when screen is off), and to have it resume when LLX comes back in the foreground (which is essential for battery efficiency)

  3. Wern-Yuen Tan hello, the clock script is the play store script from Pierre Hébert​ , not digital. And I am a real noob to scripting. I want to dive and learn from scripts that are made by others and hoping I will figure it out some day. But haven’t done it yet. Maybe someone else with better knowledge can help with your question.

  4. Arun kumar

    Intent i = new Intent(Intent.ACTION_VIEW);

    i.setClassName(“net.pierrox.lightning_launcher_extreme”,”net.pierrox.lightning_launcher.activities.Dashboard”);

    i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

    i.putExtra(“a”,35);

    i.putExtra(“d”,id-of-script + “/” + optional-data-string);

    startActivity(i);

  5. Thanks Evelien Wijbenga 

    I looked at the analog clock script, but can’t figure out how to get the pause/resume working (I’d like the clock refresh to be paused on Current Desktop pause and resumed when the Desktop resumes)

    Lukas Morawietz might you be able to offer any suggestions? Here is my clock script … the part I need help with is how to pause and resume the setTimeout command. Probably need a separate script for pause and resume?

    function refresh() {

      var now=new Date();

      var h1=(now.getHours()%12).toString().substring(0,1);

      var h2=(now.getHours()%12).toString().substring(2,1);

      var m1=now.getMinutes().toString().substring(0,1);

      var m2=now.getMinutes().toString().substring(2,1);

      LL.getCurrentDesktop().getItemByName(‘h1’).setLabel(h1);  

      LL.getCurrentDesktop().getItemByName(‘h2’).setLabel(h2);  

      LL.getCurrentDesktop().getItemByName(‘m1’).setLabel(m1);  

      LL.getCurrentDesktop().getItemByName(‘m2’).setLabel(m2);  

      setTimeout(refresh, 60000);

    }

    refresh();

  6. Wern-Yuen Tan hello, I was looking at the battery widget in the wiki, it also works with pause and resume. I asked yesterday how the widget new how to pause or resume. This answer returned:

    “item Resume” and “item Pause” is 2 different script.

    Use resume on selected item with:

     customized item >> more.. >> + >> Gesture – Resumed

    Use pause on selected item with:

     customized item >> more.. >> + >> Gesture – Paused

    Item paused when not visible (for example: when screen-off).

    Maybe this helps.

  7. Wern-Yuen Tan you need to use the resume/pause events on the clock item. In the resume event you start a timeout and start the timout id in the item tag, in the pause event you stop the timeout by retrieving its id from the item’s tag. Load the clock sample and reuse the pause/resume events scripts that have been created.

  8. Pierre Hébert thank you. I tried using the sample clock scripts for pause/resume but could’t  get the pause to retrieve the item id properly. Perhaps this is because my clock is comprised of 4 items running off one “start” script (1 for each digit of hhmm). How do I pause this with just one “pause” script?

  9. Maybe put all items in a panel, or better use a single item as the “driver”: if all items are in the same desktop they will all be resumed/paused in the same time so you can set pause/resume events on only one. Then access other items with getItemByName, after having set a name for those items. There may be 4 items but there only need to be one cyclic update for all items at the same time.

  10. Pierre Hébert great, thanks will give the “driver item” approach a shot. Need them to be separate items because I want to control their properties with Tasker and have separate gestures for each …

Leave a Reply

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