hey guys, i am trying to get a missed whatsapp counter as a label via tasker.

hey guys, i am trying to get a missed whatsapp counter as a label via tasker. I used to use my tasker profile to set this variable for zooper widget.

i have a tasker profile wich adds +1 to a variable and this variable gets picked up by the zooper variable.

so far so good.

i used 

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

to get this variable as a label and it works. But when i place the item inside a panel i cant get it to work.

i use 

this works for the item wich isnt inside a panel.

LL.getCurrentDesktop().getItemByName(“LLXwapp”).setLabel(LL.getEvent().getData(),false);

for the item inside a panel named “left”

i get Type error Cannot find function getItemByName in object Panel 65579.

LL.getCurrentDesktop().getItemByName(“left”).getItemByName(“LLXwapp”).setLabel(LL.getEvent().getData(),false);

from the API:

getItemByLabel(String label)

This method is deprecated. No replacement.

so this doesnt work 

The script gets triggered by the tasker event.

so basicly i just need to get the item inside the panel 🙂 

a really simple thing

https://www.youtube.com/watch?v=nnJQ5N8PXi8
]]>
« (Previous Post)
(Next Post) »

5 Commentsto hey guys, i am trying to get a missed whatsapp counter as a label via tasker.

  1. Anonymous says:

    < ![CDATA[

    You need to replace:


    getItemByName(“left”).getItemByName(“LLXwapp”)


    with:


    getItemByName(“left”).getContainer().getItemByName(“LLXwapp”)


    The object returned by getItemByName(“left”) is an item of kind “Panel”, and on this item you need to access the container, holding other items.



    getItemByLabel(String label) is deprecated but as long as it is in the API doc it will work, don’t worry about it too much.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Thanks Piere I will try this in about half an hour and let you know if it works

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Woehoe it worked thanks Pierre Hébert  and thanks Evelien Wijbenga ( i thought it was your tutorial =) ) for the tutorial

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Thanks Maarten H


    Sometimes if I restart LL or when restarting device I loose the text in the items, to prevent that the persistent flag had to be set to true instead of false :


    setLabel(“label”, true)


    This was not in the video found out later.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    oh oke thanks for the tip. it hasn’t happened yet. But its good to all ready have a solution

    ]]>

Leave a Reply

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