Hi all,
there is the old issue that %var gets expanded to %var both if unset or if
set to the empty string.
This behavior makes a PITA to create tasks that are able to take empty
strings as arguments, because not only these tasks have to special-case the
unset/empty case but also every caller, caller of caller, etc. of the tasks.
For example, take a task T1 that replaces the string PLACEHOLDER in an url
with the contents of %par1, where %par1 can be the empty string.
Now there is a caller T2 ot T1 with a local variable %query initialized
from its own %par1 that calls T1(%query).
The there is a caller T3 of T2 which does T2(%stuff).
T1 could expand %par1 to %par1, %stuff, %query or a "real" string
depending on the circumstances. And by all means it hasn't to rely on
checking for values like %stuff or %query that depend on the eventual
caller.
Currently there are two solutions to this problem:
1. Every task checks for unset, which absurdly duplicates the code.
2. You adopt an internal convention, for example %MY_EMPTY=!#*@&#*@!#!@,
then just special case %MY_EMPTY in T1, which only duplicates T1 code.
Both solutions sucks IMO. I love Tasker but this is extremely bizarre.
I understand that "fixing" the evaluator to expand %var to an empty string
in case it contains, well... an empty string, is backwards incompatible and
will make many people unhappy.
But what about adding a toggle at the task level or at the global level to
force a saner behavior for people starting from scratch?
And also, Tasker might add an official %EMPTY variable to initialize empty
vars.
Cheers
Carlos
Carlos Pita 's gravatar image asked Feb 17 2017 at 08:43 in Tasker by Carlos Pita

5 Answers

I know it's a pain and apologize.
Will think about it some more.
Pent
Pent 's gravatar image answered Feb 18 2017 at 01:52 by Pent
Ok, Pent, thank you for considering it, I'm copying this to the feature request forum (didn't realize there was one before).
Carlos Pita 's gravatar image answered Feb 18 2017 at 15:14 by Carlos Pita
I'm copying this to the feature request forum (didn't realize there was
I did not realize this either... Where did you find such a thing???
Rich D 's gravatar image answered Feb 18 2017 at 15:58 by Rich D
Google. But it seems to have been closed since a few days ago given
that the backlog of requests was too big.
Carlos Pita 's gravatar image answered Feb 18 2017 at 16:05 by Carlos Pita
Been closed for around 5 years I think :-)
Pent
Pent 's gravatar image answered Feb 18 2017 at 22:40 by Pent

Related Discussions

  • Tasker 4.6, Galaxy S5, Lolipop And Silent Mode (again) in Tasker

  • I've seen a couple of discussions of silent mode and lolipop on this forum but I'm going to ask the question again, does silent mode work? I can't get it to work. silent mode. When creating the task, I had three options, On, Off and Vibrate. On lolipop, I seem to have only two, Off and Vibrate. My existing profiles appear to enable "Do Not Disturb" mode and can't seem to turn it off. ...

  • Uninstalled And Notifications Won't Work Again in Tasker

  • Help! I have uninstalled the app, but my notifications won't waork again... :( What sould I do? You received this message because you are subscribed to the Google Groups "Tasker" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] Visit this group at http://groups.google.com/group/tasker. For more options, visit https...

  • Stuck On "type" Again in Tasker

  • http://gyazo.com/48e83ba0eb611328ea64919040a3d677 how do i prevent this from happening? You received this message because you are subscribed to the Google Groups "Tasker" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] Visit this group at http://groups.google.com/group/tasker. For more options, visit https://groups...

  • HTTP Get Again in Tasker

  • Hi there anybody knows how to get html data of logged in webpage.... I want http data of website after log in into it.. I want to login dynamically into tasker (in orher words).Please share any related word if you know about it.It 'll be appreciated thanks You received this message because you are subscribed to the Google Groups "Tasker" group. To unsubscribe from this group and stop receiving...

  • Cell Near On Lollipop (again) in Tasker

  • There have been discussions about Cell Near performance under Lollipop (https://groups.google.com/d/topic/tasker/QJJGgQr9DHI/discussion and https://groups.google.com/d/topic/tasker/GGevuRth3ZY/discussion) that eventually led to a change that Pent made to v4.6u2. The problem is this improvement does not work for me (nexus 6 Stock, rooted, T-Mobile USA). My Cell Near profile using the new ...

  • Hide Soft Keyboard (again) in Tasker

  • I suppose that Android do not change about this, we can not have a action to close the keyboard. For my Nexus 4 Input / Close System Dialogs does not work. I try to destroy the scene an create/show again and the keyboard is hidden, but I get a non pretty effect. I try to clone the scene to show and destroy it but I can not get the precise steps order to get a continuous scene (the scenes...

  • Again - Talking About Touchdown Exchange in Tasker

  • Hi Pent, Probably, we all know the reason that stopped you from supporting Touchdown. It is the 3-pages DNA agreement and complications of NitroDesk as well as today with Symantec it could be more complicated. However, can't you just do some changes on this agreement to make the responsibility on the user and free yourself from any subsequences. I am saying this, because me and probably...

  • OK, Let's Try This Again... in Tasker

  • The last update seems to have slowed down scene-related tasks on both my phone and my tabs. Note that all of my devices are quad-core and greater than 1.5GHz. I have a scene with about 25 buttons on it. It can take tasker up to 10 seconds to display this scene, even if I just hid it. It can also take 10 seconds for the scene to disappear. Tasks requiring multiple HTTP slow way down...

  • Profile Status On/off Toggle Does Not Trigger The Action Again in Tasker

  • Maybe I am missing the point (actually quite likely). I have a active profile, and I use profile status to turn the profile off, then on again. What I wanted to achieve was the action to be triggered again. That did not work. Basically, that is what I need to do, even though a profile is active already, run the task again. I tried turning tasker off and back on, that has the desired effect...

  • Store Screen Size In Two Variables (again) in Tasker

  • Hi, i'm trying to get screen dimensions, if i run in a terminal: $ su # dumpsys window | grep ini | grep app init€0x1280 213dpi cur€0x1280 app€0x1280 rng€0x767-1280x1247 ok, i need the app values: $ su # dumpsys window | grep ini | grep app | cut -f4 -d= | cut -f1 -dx 800 ok, first the x value. Now i go to tasker new task: 1. Run Shell Command dumpsys window | grep ini | grep app...

  • How To Get Task To Try Again If All Steps Do Not Complete in Tasker

  • Hi there, I use tasker a lot and am wondering if there is a way to repeat a task if for some reason that task does not complete. For example I have one task that opens an app on my phone at a certain time of the day and click through the app to relist a property advert I have So every now and then the task does not complete, this is sometimes because i get a pop up to say the app...

  • Stop Charging Current When Battery Reaches 95% And Start Again When At 20% ? in Tasker

  • I leave my phone plugged in 24/7 at home running heavy tasks. is there a way to automatically stop charging when battery reaches 95% then start again when the battery drops to 20% ? You received this message because you are subscribed to the Google Groups "Tasker" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] ...

  • I Have A Task That I'm Trying To Run 10 Minutes After My Screen Goes Off, But I'd Like It To Only Trigger Again When The Screen Goes Back On Instead Of Repeating A 10 Minute Loop. Is This Possible? in Tasker

  • I thought that "Events" would only run the attached task once when the settings are met. But it seems that it keeps running - every 10 minutes as long as my display remains off. I don't know how to get around this. Any ideas? You received this message because you are subscribed to the Google Groups "Tasker" group. To unsubscribe from this group and stop receiving emails from it, send an...