Created
August 20, 2015 18:05
-
-
Save cmikaiti/2c82bd6f525add900c8f to your computer and use it in GitHub Desktop.
Tasker Task to text your ETA.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TaskerData sr="" dvi="1" tv="4.7u3m"> | |
<Task sr="task22"> | |
<cdate>1345254133188</cdate> | |
<edate>1440093400667</edate> | |
<id>22</id> | |
<nme>Headed Home</nme> | |
<pri>100</pri> | |
<Action sr="act0" ve="7"> | |
<code>902</code> | |
<Int sr="arg0" val="0"/> | |
<Int sr="arg1" val="100"/> | |
<Int sr="arg2" val="0"/> | |
<Int sr="arg3" val="0"/> | |
</Action> | |
<Action sr="act1" ve="7"> | |
<code>118</code> | |
<Str sr="arg0" ve="3">maps.googleapis.com</Str> | |
<Str sr="arg1" ve="3">maps/api/directions/json</Str> | |
<Str sr="arg2" ve="3">origin=%LOC | |
destination=%HOME | |
sensor=false</Str> | |
<Str sr="arg3" ve="3"/> | |
<Str sr="arg4" ve="3"/> | |
<Int sr="arg5" val="10"/> | |
<Str sr="arg6" ve="3">text/plain</Str> | |
<Str sr="arg7" ve="3"/> | |
<Int sr="arg8" val="0"/> | |
</Action> | |
<Action sr="act2" ve="7"> | |
<code>129</code> | |
<Str sr="arg0" ve="3">var t = JSON.parse(global('HTTPD')); | |
var dur = t.routes[0].legs[0].duration.text; | |
var dist = t.routes[0].legs[0].distance.text; | |
var msg = "I'm "; | |
if (dist) msg += dist + " miles and "; | |
if (dur) msg += dur + " minutes from home."; | |
var ok = sendSMS(global('HOMENUM'), msg); | |
flashLong("Sent message: " + msg);</Str> | |
<Str sr="arg1" ve="3"/> | |
<Int sr="arg2" val="1"/> | |
<Int sr="arg3" val="45"/> | |
<ConditionList sr="if"> | |
<Condition sr="c0" ve="3"> | |
<lhs>%HTTPL</lhs> | |
<op>7</op> | |
<rhs>0</rhs> | |
</Condition> | |
</ConditionList> | |
</Action> | |
</Task> | |
</TaskerData> |
I had used the original for a while but it quit working. Is this the original and does it work for you?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not my idea or code, but can't find the original and someone else asked for it.