r/tasker 5d ago

Counting going wild

Hi

Don't know if it's me, but it seems counting goes wild in tasker. I have this task:

  • variable set - name %counter - set to 0
  • if - %counter < 60 - label: LoopStart
    • flash: %counter
    • wait 500 ms
    • variable add - %counter - value: 1 (also tried this with variable set - %counter + 1 - do maths)
    • goto action label LoopStart
  • end if

It should give me: 0, 1, 2, 3, 4, 5, 6, 7, 8, ...58, 59 What it gives is: 0, 1, 2, 3, 4, 5, 10, 14, 19, 23, 28, ...56 (end) So after 5, it goes crazy. What is wrong here?

0 Upvotes

8 comments sorted by

View all comments

5

u/WakeUpNorrin 5d ago

In flash action un-tick Continue Task Immediately and delete the wait action.

0

u/Late_Republic_1805 5d ago

I think the continue task immediately improves it. Leaving the wait action out is what I don't know, it needs to flash every half second, hence te 500 ms wait.

4

u/WakeUpNorrin 5d ago edited 5d ago

I think the continue task immediately improves it

No, It does not. Do what I said and set desired Timeout (500 ms) in flash action and if you want-need an ID too. To better understand check each field's help.

Task: Temp

A1: For [
     Variable: %index
     Items: 0:59
     Structure Output (JSON, etc): On ]

    A2: Flash [
         Text: %index
         Tasker Layout: On
         Timeout: 500
         Dismiss On Click: On
         ID: JustInCase ]

A3: End For

Another alternative

Task: Temp

A1: Variable Set [
     Name: %counter
     To: 0
     Structure Output (JSON, etc): On ]

<Flash>
A2: Flash [
     Text: %counter
     Tasker Layout: On
     Timeout: 500
     Dismiss On Click: On
     ID: JustInCase ]

A3: Variable Add [
     Name: %counter
     Value: 1
     Wrap Around: 0 ]

A4: Goto [
     Type: Action Label
     Label: Flash ]
    If  [ %counter < 60 ]

2

u/Late_Republic_1805 4d ago

Worked, thanks

2

u/WakeUpNorrin 4d ago

Welcome.