Tasker, how to append a string to a variable

Tasker is making this simple task complicated.

I am doing a “Send Intent” action within a task and I need the extra 1 and extra 2 to be a string concatenated to a number variable concatenated to another string.

In most languages it’d be something like

extra1 = "str1:" + integer + "str2" 

It’d be easier if there were spaces between the strings; it’d just be str1 %integer str2, but there are no spaces to separate things out.

How do I accomplish this?

How to query contact details for linked messaging apps profiles (Specially Telegram) and launch them with tasker?

Since the TouchlessChat app was deleted from the PlayStore I am trying to create a task that simulates the behavior of it.

Right now I am able to capture my message using voice and get the contact ID with AutoContacts. Now I need to do something like:

If Telegram Send Telgram Message Else If WhatsApp Send WhatsApp Message Else Send SMS 

But I am not able to get the Telegram info for it (AutoContacts has a WhatsApp Uri). My closest friends and family use Telegram so it is almost my first option.

Is there a way to query the contact details to get the correct Telegram URI or similar so I can launch the app with it?

How to have different Enter and Exit conditions for a context in tasker?

I’m using Tasker with a set of conditions on a context.

I want the context to be only entered when the screen is off.

However, I don’t want the context to be exited by merely turning on the screen; only the other conditions should be relevant for exiting the context.

What’s the “proper” way to achieve this in Tasker? Is there an elegant solution?

Easy Flashlight/Torch Toggle easily using tasker

I want to turn on the torch on the device by pressing the power button 3 times(or something convenient) and display a notification saying “Flashlight ON” and turn it off by simply swiping out(clearing) the notification.

I have achieved this by creating 2 macros in Macrodroid.

But I wanted to do the same exact thing with Tasker because obviously tasker can do a lot of things whereas macrodroid is limited to only a set of things and its not worth using both of them at the same time.

Tasker | Intent Received | access Extras via tasker variables

I have Tasker send an Intent to Weather Ace then listens for an Intent Received. Upon receiving the responding Broadcast Intent from Weather Ace, the Extra fields are supposed to be available via local tasker %variables but when I try to flash them to the screen, something goes wrong.

I do get a flash to the screen but it seems that all the variables are empty.

Here’s my triggering task, the listening profile, and the flashing task:


DESCRIPTION FORMAT

Weather Ace: Send Weather Data (79)     A1: Send Intent [ Action:mycodefab.aleph.weather.WEATHER_DATA Cat:None Mime Type: Data: Extra: Extra: Extra: Package: Class: Target:Broadcast Receiver ]   Profile: Weather Ace: Weather Data (9)     Event: Intent Received [ Action:mycodefab.aleph.weather.WEATHER_DATA Cat:None Cat:None Scheme:* Mime Type:* ] Enter: Weather Ace: Response Handler (27)     A1: JavaScriptlet [ Code:var nl = "\n";  var output = "";  output =  `intent_data: $  {     local("%intent_data") + nl }`;  var forEachCount = 0;  evtprm.forEach(     function(item){          forEachCount++          output += `Event Param $  {              forEachCount          }: $  {              item + nl          }`;      } );  output += `request_tag: $  {     local("%request_tag") + nl }`;  output += `error_desc: $  {     local("%error_desc") + nl }`;  output += `api_version: $  {     local("%api_version") + nl }`;  output += `place_name: $  {     local("%place_name") + nl }`;  output += `place_lon: $  {     local("%place_lon") + nl }`;  output += `place_lat: $  {     local("%place_lat") + nl }`;  output += `place_autofollow: $  {     local("%place_autofollow") + nl }`;  output += `is_day: $  {     local("%is_day") + nl }`;  output += `updated: $  {     local("%updated") + nl }`;  output += `weather_desc: $  {     local("%weather_desc") + nl }`;  output += `type: $  {     local("%type") + nl }`;  output += `current: $  {     local("%current") + nl }`;  output += `datetime: $  {     local("%datetime") + nl }`;  output += `temp_max: $  {     local("%temp_max") + nl }`;  output += `temp_min: $  {     local("%temp_min") + nl }`;  output += `pressure: $  {     local("%pressure") + nl }`;  output += `humidity: $  {     local("%humidity") + nl }`;  output += `windspeed: $  {     local("%windspeed") + nl }`;  output += `windspeed: $  {     local("%windspeed") + nl }`;  output += `windspeed_gusts: $  {     local("%windspeed_gusts") + nl }`;  output += `weather_id: $  {     local("%weather_id") + nl }`;  output += `dewpoint_max: $  {     local("%dewpoint_max") + nl }`;  output += `dewpoint_min: $  {     local("%dewpoint_min") + nl }`;  output += `sunrise: $  {     local("%sunrise") + nl }`;  output += `sunset: $  {     local("%sunset") + nl }`;  output += `wind_degree: $  {     local("%wind_degree") + nl }`;  output += `precipitation: $  {     local("%precipitation") + nl }`;  output += `pop: $  {     local("%pop") + nl }`;  output += `cloudiness: $  {     local("%cloudiness") + nl }`;  output += `uvi: $  {     local("%uvi") + nl }`;  output += `visibility: $  {     local("%visibility") + nl }`;  output += `feelslike_max: $  {     local("%feelslike_max") + nl }`;  output += `feelslike_min: $  {     local("%feelslike_min") + nl }`;  output += `name: $  {     local("%name") + nl }`;  output += `coords: $  {     local("%coords") + nl }`;  output += `autofollow: $  {     local("%autofollow") + nl }`;  output += `timezone: $  {     local("%timezone") + nl }`;  flashLong(output); Libraries: Auto Exit:On Timeout (Seconds):45 ]  

XML FORMAT Firing Task

<TaskerData sr="" dvi="1" tv="5.7.1">     <Task sr="task79">         <cdate>1556200360404</cdate>         <edate>1557607436237</edate>         <id>79</id>         <nme>Weather Ace: Send Weather Data</nme>         <pri>100</pri>         <Action sr="act0" ve="7">             <code>877</code>             <Str sr="arg0" ve="3">mycodefab.aleph.weather.WEATHER_DATA</Str>             <Int sr="arg1" val="0"/>             <Str sr="arg2" ve="3"/>             <Str sr="arg3" ve="3"/>             <Str sr="arg4" ve="3"/>             <Str sr="arg5" ve="3"/>             <Str sr="arg6" ve="3"/>             <Str sr="arg7" ve="3"/>             <Str sr="arg8" ve="3"/>             <Int sr="arg9" val="0"/>         </Action>     </Task> </TaskerData> 

XML FORMAT Listener Profile

<TaskerData sr="" dvi="1" tv="5.7.1">     <Profile sr="prof9" ve="2">         <cdate>1557374196351</cdate>         <edate>1557605085547</edate>         <id>9</id>         <mid0>27</mid0>         <nme>Weather Ace: Weather Data</nme>         <Event sr="con0" ve="2">             <code>599</code>             <Str sr="arg0" ve="3">mycodefab.aleph.weather.WEATHER_DATA</Str>             <Int sr="arg1" val="0"/>             <Int sr="arg2" val="0"/>             <Str sr="arg3" ve="3"/>             <Str sr="arg4" ve="3"/>         </Event>     </Profile>     <Task sr="task27">         <cdate>1555907929554</cdate>         <edate>1557605755446</edate>         <id>27</id>         <nme>Weather Ace: Response Handler</nme>         <pri>6</pri>         <Action sr="act0" ve="7">             <code>129</code>             <Str sr="arg0" ve="3">var nl = "\n";  var output = "";  output =  `intent_data: $  {     local("%intent_data") + nl }`;  var forEachCount = 0;  evtprm.forEach(     function(item){          forEachCount++          output += `Event Param $  {              forEachCount          }: $  {              item + nl          }`;      } );  output += `request_tag: $  {     local("%request_tag") + nl }`;  output += `error_desc: $  {     local("%error_desc") + nl }`;  output += `api_version: $  {     local("%api_version") + nl }`;  output += `place_name: $  {     local("%place_name") + nl }`;  output += `place_lon: $  {     local("%place_lon") + nl }`;  output += `place_lat: $  {     local("%place_lat") + nl }`;  output += `place_autofollow: $  {     local("%place_autofollow") + nl }`;  output += `is_day: $  {     local("%is_day") + nl }`;  output += `updated: $  {     local("%updated") + nl }`;  output += `weather_desc: $  {     local("%weather_desc") + nl }`;  output += `type: $  {     local("%type") + nl }`;  output += `current: $  {     local("%current") + nl }`;  output += `datetime: $  {     local("%datetime") + nl }`;  output += `temp_max: $  {     local("%temp_max") + nl }`;  output += `temp_min: $  {     local("%temp_min") + nl }`;  output += `pressure: $  {     local("%pressure") + nl }`;  output += `humidity: $  {     local("%humidity") + nl }`;  output += `windspeed: $  {     local("%windspeed") + nl }`;  output += `windspeed: $  {     local("%windspeed") + nl }`;  output += `windspeed_gusts: $  {     local("%windspeed_gusts") + nl }`;  output += `weather_id: $  {     local("%weather_id") + nl }`;  output += `dewpoint_max: $  {     local("%dewpoint_max") + nl }`;  output += `dewpoint_min: $  {     local("%dewpoint_min") + nl }`;  output += `sunrise: $  {     local("%sunrise") + nl }`;  output += `sunset: $  {     local("%sunset") + nl }`;  output += `wind_degree: $  {     local("%wind_degree") + nl }`;  output += `precipitation: $  {     local("%precipitation") + nl }`;  output += `pop: $  {     local("%pop") + nl }`;  output += `cloudiness: $  {     local("%cloudiness") + nl }`;  output += `uvi: $  {     local("%uvi") + nl }`;  output += `visibility: $  {     local("%visibility") + nl }`;  output += `feelslike_max: $  {     local("%feelslike_max") + nl }`;  output += `feelslike_min: $  {     local("%feelslike_min") + nl }`;  output += `name: $  {     local("%name") + nl }`;  output += `coords: $  {     local("%coords") + nl }`;  output += `autofollow: $  {     local("%autofollow") + nl }`;  output += `timezone: $  {     local("%timezone") + nl }`;  flashLong(output);</Str>             <Str sr="arg1" ve="3"/>             <Int sr="arg2" val="1"/>             <Int sr="arg3" val="45"/>         </Action>         <Img sr="icn" ve="2">             <nme>hd_action_help</nme>         </Img>     </Task> </TaskerData> 

XML FORMAT Listener Profile Task

<TaskerData sr="" dvi="1" tv="5.7.1">     <Task sr="task27">         <cdate>1555907929554</cdate>         <edate>1557605755446</edate>         <id>27</id>         <nme>Weather Ace: Response Handler</nme>         <pri>6</pri>         <Action sr="act0" ve="7">             <code>129</code>             <Str sr="arg0" ve="3">var nl = "\n";  var output = "";  output =  `intent_data: $  {     local("%intent_data") + nl }`;  var forEachCount = 0;  evtprm.forEach(     function(item){          forEachCount++          output += `Event Param $  {              forEachCount          }: $  {              item + nl          }`;      } );  output += `request_tag: $  {     local("%request_tag") + nl }`;  output += `error_desc: $  {     local("%error_desc") + nl }`;  output += `api_version: $  {     local("%api_version") + nl }`;  output += `place_name: $  {     local("%place_name") + nl }`;  output += `place_lon: $  {     local("%place_lon") + nl }`;  output += `place_lat: $  {     local("%place_lat") + nl }`;  output += `place_autofollow: $  {     local("%place_autofollow") + nl }`;  output += `is_day: $  {     local("%is_day") + nl }`;  output += `updated: $  {     local("%updated") + nl }`;  output += `weather_desc: $  {     local("%weather_desc") + nl }`;  output += `type: $  {     local("%type") + nl }`;  output += `current: $  {     local("%current") + nl }`;  output += `datetime: $  {     local("%datetime") + nl }`;  output += `temp_max: $  {     local("%temp_max") + nl }`;  output += `temp_min: $  {     local("%temp_min") + nl }`;  output += `pressure: $  {     local("%pressure") + nl }`;  output += `humidity: $  {     local("%humidity") + nl }`;  output += `windspeed: $  {     local("%windspeed") + nl }`;  output += `windspeed: $  {     local("%windspeed") + nl }`;  output += `windspeed_gusts: $  {     local("%windspeed_gusts") + nl }`;  output += `weather_id: $  {     local("%weather_id") + nl }`;  output += `dewpoint_max: $  {     local("%dewpoint_max") + nl }`;  output += `dewpoint_min: $  {     local("%dewpoint_min") + nl }`;  output += `sunrise: $  {     local("%sunrise") + nl }`;  output += `sunset: $  {     local("%sunset") + nl }`;  output += `wind_degree: $  {     local("%wind_degree") + nl }`;  output += `precipitation: $  {     local("%precipitation") + nl }`;  output += `pop: $  {     local("%pop") + nl }`;  output += `cloudiness: $  {     local("%cloudiness") + nl }`;  output += `uvi: $  {     local("%uvi") + nl }`;  output += `visibility: $  {     local("%visibility") + nl }`;  output += `feelslike_max: $  {     local("%feelslike_max") + nl }`;  output += `feelslike_min: $  {     local("%feelslike_min") + nl }`;  output += `name: $  {     local("%name") + nl }`;  output += `coords: $  {     local("%coords") + nl }`;  output += `autofollow: $  {     local("%autofollow") + nl }`;  output += `timezone: $  {     local("%timezone") + nl }`;  flashLong(output);</Str>             <Str sr="arg1" ve="3"/>             <Int sr="arg2" val="1"/>             <Int sr="arg3" val="45"/>         </Action>         <Img sr="icn" ve="2">             <nme>hd_action_help</nme>         </Img>     </Task> </TaskerData> 

How to get tomorrow’s date and next week’s number for use in Tasker

Based on this answer I am looking for a way how to get tommorow’s date and next week number to use in Tasker app, Run Shell Command.

I have tried:

date -d '+1 day' +"%Y%m%d" and similar, but still I am getting Error: 1.

In shell emulator I get bad date '+1 day'

Cannot find any android shell commands reference or man.

Some guides recommend using %TIMES variable, but not sure how.