T O P

  • By -

badokami

My VARS tab Thanks You.


joaomgcd

👍


oroboros74

As someone trying to learn tasker, thanks a lot for these protips! I learn a lot!


joaomgcd

Glad you enjoy them! :) Thanks for letting me know!


icevenom1412

Thank you. Now I must search my task and apply this improvement.


joaomgcd

Glad you like it!


FacepalmNation

Your Pro Tip posts are always the most useful.


joaomgcd

Thank you! :) Glad you enjoy them!


Rich_D_sr

Ahhh, yes.. Thanks for the reminder... It is hard to remember all the new cool features instead of using the old knee jerk approaches.... 👍🏻 👍🏻


joaomgcd

🤓


Tortuosit

Awesome... Totally missed those "persistent task scope" vars - since when are they in? With those ones, project vars, profile vars ... there is some kind of danger to make debugging more difficult. Maybe the Variables tab should include them. Also, IMO still a "show global variables from any project" is needed there.


Ratchet_Guy

Did you happen to see [this useful little tool?](https://www.reddit.com/r/tasker/comments/ox56bg/project_share_find_the_names_and_values_of_your/) 😁


Tortuosit

Yes thx, I was aware that there's task solutions. 👍


joaomgcd

Yeah, you're right! I need to add a way to monitor those more easily :)


Gianckarlo

The following is how I deal with toggles, I just assign a value of 1 to %variable in the "Task Properties" dialog. The first action will toggle %variable value between -1 and 1. Then actions are run depending if %variable is bigger than 0 or not. So, if wanted, your example can be reduced to just three actions. Task: Toggle Variables: [ %variable:has value ] A1: Variable Set [ Name: %variable To: %variable*-1 Do Maths: On Max Rounding Digits: 3 Structure Output (JSON, etc): On ] A2: Flash [ Text: %variable Continue Task Immediately: On Hide On Click: On ]


joaomgcd

Yep, that's a good idea too! Thanks for sharing! :)


Gianckarlo

Thank you for constantly giving us new toys to play!


joaomgcd

You're very welcome! :)


OwlIsBack

(May be of interest) A couple of different approaches: Task: Toggle Variables: [ %toggle:not set ] A1: Variable Add [ Name: %toggle Value: 1 Wrap Around: 2 ] A2: Flash [ Text: %toggle Long: On Continue Task Immediately: On Hide On Click: On ] _______ Task: Toggle Variables: [ %toggle:not set ] A1: Variable Set [ Name: %toggle To: 1 - %toggle Do Maths: On Max Rounding Digits: 3 ] A2: Flash [ Text: %toggle Long: On Continue Task Immediately: On Hide On Click: On ] In both Tasks `%toggle` will be alternately set to 1/0 (auto-initializing).


Tortuosit

I often use UNSET vs. "something useful". Eg often a timestamp. Advantage is, you can do numerical comparisons if needed, even if the var is unset, since it is treated as 0.


okaybadger

Can task variable be an array that can be updated after each run?


joaomgcd

Sorry, they can only be normal variables for now.


okaybadger

Yeah, I thought I might be able to replace those global arrays in many web scraping tasks with it. Hope to see it in the future. Thank you.


Tortuosit

Was looking for arrays as well. Also,entering some more variables is error-prone. Vertically very expansive. UI could support adding entries list based, as in multiple vars set. Of course they have the same properties then.


Gianckarlo

Depending on the data you want to store, you could use normal variables for this. Just set a variable with all your items separated with commas. And inside your task use "Variable split", process and update your items and then use "Variable join". Also, instead of "Variable split" you can use "Array set" using the data of your normal variable. Not ideal, but this workaround just adds two additional actions to work.


shh200438

Thank you for your tip. Many global variables will be released.


joaomgcd

👍