I’ve used Tasker for a while, but just recently I decided to try out some profiles from others.   One cool profile that I found is the profile to automatically reply to an SMS message when driving.   But it requires a little bit of work to get it to actually function.   So here’s the steps I took to get it to work.  Keep in mind that I’m currently running the Cyanogen mod, so some of these steps may work out of the box for you if you’re running a stock ROM.

  1. Download the profile from the Tasker Wiki here: http://tasker.wikidot.com/autorespondwhiledriving
  2. Notice that this profile is looking for a task called “Convert_LOCSPD_MPH”.  This task basically sets the variable that converts the speed to MPH.  So we’ll have to create that.
  3. Click “Tasks”
  4. Click “New Task +”
  5. Give your task a name.  For mine, I used “ConvertMPH” just because it’s simple to know that’s what it does.
  6. Click the “+” in the task to add a new action.
  7. Click “Variable”
  8. Click “Variable Set”
  9. In the “Name” field, type %LOCSPDMPH
  10. In the “To” field, type %LOCSPD * 2.23693629
  11. Check the “Do Maths” checkbox
  12. Click “Done” to save changes to the action
  13. Click “Done” to save your task
  14. OK, now the task is created.  Let’s go plug it into the profile.
  15. Open the “Received Text” profile
  16. Click the “Auto Respond (If Driving)” task
  17. Click “Edit”
  18. For whatever reason, simply re-linking the “Perform Task” action didn’t work for me.  I kept getting an error that said the task doesn’t exist when trying to test it.  So I had to delete it and re-create it to get it to work.
  19. Long-click on the “Perform Task” with the name “Convert_LOCSPD_MPH” and then drag it to the trash can.   This will delete that action, but we’ll want to recreate it.
  20. Click the “+” icon to add a new action.
  21. Click “Tasker”
  22. Click “Perform Task”
  23. Above the “Name” field you’ll see a magnifying glass.  Click this and then choose the task you just created a little bit ago.   For me, it was the “ConvertMPH” task.
  24. Click “Done” to save your action.
  25. Now long-click on the “Perform Task” action and then move it above the “Send SMS” actions.
  26. So the final order of the actions are: 1) Goto Action 2) GPS 3) Get Location 4) Perform Task 5) Send SMS
  27. Click “Done” to save your task

OK so the task is all set up.  Now to test it.  How can you test it without actually driving, though?  Well, we can actually take out the variable that checks the speed to test it.  Before you do this, though, send yourself a text message because this task will automatically reply to whomever the last person who text’d you.  So if you don’t send yourself a text message then whomever sent you a text message last will get an auto-reply from you.
Once you’ve sent yourself a text message, go back to Tasker and open up the “Auto Respond (If Driving)” task under the “Received Text” profile.

Open up the “Send SMS” action (should be number 5).  Scroll down and you’ll find an IF statement that says %LOCSPDMPH > 5.  Basically that means that this will only send an SMS if the GPS reports that you’re going greater than 5 MPH.  So to test this, simply uncheck the checkbox to the right of “If” to turn off that if statement.   Note: In here is where you can choose to store the SMS in your messaging app (if you want to see it in your sent folder of your SMS application as well as change the text of the actual SMS message as well.  But if you’re running a test, don’t make any changes yet.  Make sure it works first and then come back and change the text if that’s what you want to do.

Once the “If” statement is disabled, click “Done” to save the action.  Then click the “Test” button on the task.  Once you click “Test” you’ll notice a “Kill All” button that shows up to the left of “Test”.  That means Tasker is working to run the task.   Wait for the “Kill All” button to go away.  Once it goes away, click “Cancel” to close out of the task.   If you click “Done” it will save your changes and you’ll have to go back in to add the if statement again.
That’s it!  You should now have a new text message that says something to the effect of:

(Auto) Texting and driving is dangerous.  I’m currently driving (at 0 MPH).  Will respond to you when I can safely.

By the way, the 0 MPH isn’t anything to worry about since this is just a test and quite obviously as you’re testing this you’re not going to be actually driving.  :)