Re: SMS auto reply using %SMSRN in the message

296 views
Skip to first unread message

kgirl

unread,
Oct 11, 2013, 7:43:24 PM10/11/13
to tas...@googlegroups.com
Ever figure it out?  I'm trying to do the same thing. 

Brandon Horwath

unread,
Oct 12, 2013, 3:07:39 AM10/12/13
to tas...@googlegroups.com
Variable set, %SMSRN to %smsrn

Variable split, %smsrn, splitter: (leave blank) replace: (no, leave unchecked)

Alert, flash: %smsrn(1)

This is first name.

Unicyclist

unread,
Oct 12, 2013, 10:29:00 AM10/12/13
to tas...@googlegroups.com
The post above has it right.
Just to explain a bit: Leaving the splitter blank will split on "white space", meaning the space between names. Then %smsrn(1) is first name %smsrn(2) is last.

Also, make sure to use all lower case. It's explained in the Tasker user guide, but essentially it means less clean up for Tasker.

Robinhood Java

unread,
Nov 9, 2014, 10:30:07 PM11/9/14
to tas...@googlegroups.com


On Thursday, August 23, 2012 2:41:08 AM UTC+7, Craig C wrote:
Hi folks
I'm a noob to tasker but find it very useful.
I have set up an sms auto reply for text and unanswered voice messages. I have the %SMSRN name variable in the message body (for text autoreply) but this inserts the full name in the message.

Ex: Hi %SMSRN (first last name) sorry I missed your text but.....

I would like to have just the first name only inserted in the message body.

Ex: Hi %SMSRN1 (first name) sorry I missed your text but....

It appears I need to set up a variable split to accomplish this but have had no luck finding information as how to implement this. 

Can someone help with this?



I am sorry to hijack, but I got looping as the person that this automatic sms sent back to also has auto reply. How do I get it to only detect if this has already sent, not to reply again?

Don D

unread,
Nov 10, 2014, 9:20:51 AM11/10/14
to tas...@googlegroups.com
my autoreply, which I only use when driving, goes like this

Text Auto Reply (22)
A1: If [ %LASTSMS !~ %SMSRF ]
A2: Send SMS [ Number:%SMSRF Message:Sorry I can't read your text now, I'm driving. I will reply when I can. Store In Messaging App:Off ] 
A3: Variable Set [ Name:%LASTSMS To:%SMSRF Do Maths:Off Append:Off ] 
A4: End If 


As I too am a noob, I'm sure there are more elegant ways to handle this.  But it does keep me from sending replies to the same recipient over and over again.

Phil

unread,
Nov 15, 2014, 4:35:25 PM11/15/14
to tas...@googlegroups.com

What I do is maintain an array variable that contains each unique phone number that an auto-response was already sent to.  I check the array to see if the number associated with the newly received text is already in it and if so, ignore it.  Otherwise, if the phone number isn't already in the array, it's placed into the array and the auto-response is sent.  I clear this array during the Task exit condition.

TT Contributor 007

unread,
Nov 15, 2014, 10:10:45 PM11/15/14
to tas...@googlegroups.com
This sound great. Mind sharing your code?

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/MLk9rw-X5RI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.



--
-----------
Education is like sex, it's good when it's free.
Message has been deleted

Phil

unread,
Nov 16, 2014, 12:24:39 PM11/16/14
to tas...@googlegroups.com


Sure, my car mode task does quite a bit more so you'll probably want to delete the pieces you don't need.  For instance, I only have the SMS Reply sent when I'm running my GPS app even if I'm in the car. It also responds w/ the music I'm listening (if I'm currently playing some) to since obviously everybody cares about that (one of these days I'll have it send a Spotify link to the tune)-- these variables are set in a different task.  Additionally, I also manually maintain the NeverAutoReplyDriving variable that is comma-separated of all of the full names to not send the auto reply-- since some people get annoyed at it (or you don't want your boss to know you're currently driving when you're supposed to be at your desk-- not that I would ever do such a thing).

SMS Reply (49)
A1: Stop [ With Error:Off Task: ] If [ %GPSForeground ~ No ]
A2: If [ %PACTIVE ~ *,Car,* ]
A3: Variable Split [ Name:%NeverAutoReplyDriving Splitter:, Delete Base:Off ] 
A4: Stop [ With Error:Off Task: ] If [ %NeverAutoReplyDriving(#?%SMSRN) != 0 ]
A5: Variable Split [ Name:%SMSRN Splitter: Delete Base:Off ] 
A6: Variable Set [ Name:%smsFirstName To:%SMSRN1 Do Maths:Off Append:Off ] 
A7: Variable Set [ Name:%elapsed To:%TIMES - %LastTrackTime Do Maths:On Append:Off ] 
A8: Variable Set [ Name:%temp To:%LastSMSArray(#?%SMSRN) Do Maths:Off Append:Off ] 
A9: If [ %temp = 0 ]
<Song playing>
A10: If [ %elapsed > 300 ]
A11: Variable Set [ Name:%auto_reply_message To:[Auto response] Hi %smsFirstName, I'm currently driving and listening to %LastArtist on %LastMusicApp. I'll respond when I can. Do Maths:Off Append:Off ] 
A12: Else 
A13: Variable Set [ Name:%auto_reply_message To:[Auto response] Hi %smsFirstName, I'm currently driving. I'll respond when I can. Do Maths:Off Append:Off ] 
A14: End If 
A15: Send SMS [ Number:%SMSRF Message:%auto_reply_message Store In Messaging App:On ] If [ %SMSRB Set ]
A16: Array Push [ Name:%LastSMSArray Position:1 Value:%SMSRN Fill Spaces:Off ] 
A17: End If 
A18: End If 

TT Contributor 007

unread,
Nov 16, 2014, 8:36:08 PM11/16/14
to tas...@googlegroups.com
"(or you don't want your boss to know you're currently driving when you're supposed to be at your desk-- not that I would ever do such a thing)"

Yes, that's the lovely part ;)

Morgan Young

unread,
Nov 28, 2015, 3:44:13 PM11/28/15
to Tasker
This is awesome. Thank you for sharing. I found this while trying to learn what in the world an array does. This does something I wanted the tasker profile/project "busy mode" to do. (http://tasker.wikidot.com/busy-mode ) I have replied to people after the auto-text and their subsequent reply got them another auto reply which they do not like at all.
Thanks again.
Reply all
Reply to author
Forward
0 new messages