• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Need some help with Tasker.

johnday29

Lurker
I am a baby when it comes to creating my own task in tasker and am looking for some help. I have been using the auto text while driving profile from the tasker wiki for a long time now and would like to make it a little better. Can someone tell me how to do the following? When driving if I receive multiple text from a number each text is responded to with a text message saying that "I am driving at such and such speed and will respond when it is safe to do so" I would like to add to this task a line that if the text message that was just received has already been replied to in the last 5 minutes terminate task and do not send a repeat driving message. This will help especially on group text where evertime someone talks while I am driving they get another update on my speed LOL.......Please Help Thanks.

here is the web site for the wiki that I used. http://tasker.wikidot.com/autorespondwhiledriving
 
just incase anyone else wants the info here are a couple responses I got on another form.

from :Brandon H.

John,

This will likely take a series of profiles and tasks. Lets get some basics laid out, then work in things like speed and location... etc.

First, you need a profile for BT connected to your vehicle plus a received text event context. You'll need to consider recipient, and you want to track that so I suggest using an array to do so. You'll want to examine array usage, and how arrays vary from variables and how they're similar... that way you don't get mixed up. Once you're more familiar, a lot of what's discussed further will make more sense. This will also help you automatically respond in various ways based on who sent a number of texts within a timeframe.

Now, basically you'll want to look at %SMSRN and with each event that occurs for the created profile have that value placed in an array for reference. Based on if that value already exists and how many [using %Arr(#?%SMSRN) and the resulting quantities] a filtered response can be applied. Speed and location tasks can be created later, you can search the forums here for loads of suggestions.

Then, I would suggest having an exit task for the profile that simply clears the array. That way your message responses (and logs) start fresh with the next BT connection. Or, if you are really concerned about resetting every 5 minutes you could create another profile with a repeating time context of 5 minutes plus a defined array value existing (Variable value %Arr(#) maths not equal to zero) and have that entry task clear the array.

Post back with any questions I'm sure you'll have. Hope this helps a little though.

from: Rich B.

I started with the same wiki entry you did a few days ago and then expanded with other features from other sites. As noted elsewhere, you need to track the numbers. Here is my profile and tasks. It might be helpful. I have an extra if in the middle because my wife didn't like the standard reply everyone else got. :-). You also have to substitute my BT connection names for your own. Also, my phone is rooted so I use secure settings to turn on GPS. If you leave GPS on, you won't need this. Oh, A4 is not necessary. it's turned off for me. The wiki profile uses a separate task to calculate speed. I just put the calculation in the one task. I assume it works. If not you can turn off A5 and use A4 instead.

Profile: Driving SMS (3)
Enforce: no
Event: Received Text [ Type:Any Sender:C:ANY Content:* ]
State: BT Connected [ Name:Audi MMI*/AUDI MMI* Address:* ]
State: Variable Value [ %GPS ~ On ]
Enter: Driving Auto Response (2)
A1: Goto [ Type:Action Number Number:3 Label: ] If [ %GPS ~ on ]
A2: Secure Settings [ Configuration:GPS Enabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):0 ]
A3: Get Location [ Source:GPS Timeout (Seconds):100 Continue Task Immediately:Off Keep Tracking:Off ]
A4: [X] Perform Task [ Name:Convert LOCSPD To MPH Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ]
A5: Variable Set [ Name:%LOCSPDMPH To:%LOCSPD*2.23693629 Do Maths:On Append:Off ]
A6: If [ %SMSRF ~ 704******* ]
A7: Send SMS [ Number:%SMSRF Message:*****Msg Redacted Store In Messaging App:On ] If [ %LOCSPDMPH > 25 & %DRIVE_RA !~ *%SMSRF* ]
A8: Else
A9: Send SMS [ Number:%SMSRF Message:[Auto Reply] I'm driving right now. My current speed is about %LOCSPDMPH mph. I will respond when I can do so safely. Thx. Store In Messaging App:Off ] If [ %LOCSPDMPH > 15 & %DRIVE_RA !~ *%SMSRF* ]
A10: End If
A11: Variable Set [ Name:%DRIVE_RA To:%SMSRF Do Maths:Off Append:On ] If [ %DRIVE_RA !~ *%SMSRF* ]
 
Back
Top Bottom