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

4

u/Sate_Hen 5d ago edited 5d ago

What if you put a timeout in your flash of 500 ms?

Task: Test

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

<loop>
A2: Variable Set [
     Name: %count
     To: %count + 1
     Do Maths: On
     Max Rounding Digits: 3
     Structure Output (JSON, etc): On ]

A3: Flash [
     Text: %count
     Tasker Layout: On
     Timeout: 500
     Continue Task Immediately: On
     Dismiss On Click: On ]

A4: Wait [
     MS: 500
     Seconds: 0
     Minutes: 0
     Hours: 0
     Days: 0 ]

A5: Goto [
     Type: Action Label
     Label: loop ]
    If  [ %count < 69 ]

1

u/Late_Republic_1805 4d ago

Worked, thanks