Getting a perfect Auto-Reply task


Last Updated:

  1. JustinSC

    JustinSC Member

    I am trying to make an SMS auto-responder that activates on Wednesday from 1-5, and Thursday and Friday from 9-5, only sends one message per person per day, and will only give me a loud alert if the word "urgent" is entered. Can you guys steer me in the right direction?

    Advertisement
  2. electricpete

    electricpete Well-Known Member

    That is a weird set of requirements. Seems somewhat arbitrary and convoluted, but very do-able with Tasker. I was tempted to ask what have you done so far. But I decided to type it into Tasker and export my profiles. Here they are:

    Profile: Wed (392)
    Day: Wed
    Event: Received Text [ Type:Any Sender:* Content:* ]
    Time: From 13:00 Till 17:00
    Enter: ReplyTask (393)
    A1: If [ %MMSRS ~ *urgent* ]
    A2: Notification Volume [ Level:7 Display:Off Sound:Off ]
    A3: Notify Vibrate [ Title:Urgent Sms Text: Icon:<icon> Number:0 Pattern: Priority:3 ]
    A4: End If
    A5: If [ %SMSRN ~ *john* ]
    A6: If [ %JohnCounter > 0 ]
    A7: Stop [ With Error:Off Task: ]
    A8: Else
    A9: Variable Add [ Name:%JohnCounter Value:1 Wrap Around:0 ]
    A10: End If
    A11: End If
    A12: If [ %SMSRN ~ *fred* ]
    A13: If [ %FredCounter > 0 ]
    A14: Stop [ With Error:Off Task: ]
    A15: Else
    A16: Variable Add [ Name:%FredCounter Value:1 Wrap Around:0 ]
    A17: End If
    A18: End If
    A19: Send SMS [ Number:%SMSRF Message:Sorry - you are not important to me...try again later, much later. Store In Messaging App:Off ]

    Profile: ThursFri (396)
    Day: Thu or Fri
    Event: Received Text [ Type:Any Sender:* Content:* ]
    Time: From 09:00 Till 17:00
    Enter: ReplyTask (393) [SAME AS ABOVE]

    Profile: CounterReset (394)
    Time: From 00:00
    Enter: Anon (395)
    A1: Variable Set [ Name:%JohnCounter To:0 Do Maths:On Append:Off ]
    A2: Variable Set [ Name:%FredCounter To:0 Do Maths:On Append:Off ]
    JemmyDucks and JustinSC like this.
  3. JustinSC

    JustinSC Member

    This request is for my school, as I have to pay nearly constant attention, but someone back home needs a bit of help on occasion, so I need to be able to deactivate the profile. What I had done so far was an auto replier, but it ignored urgent, and I wasn't sure where to start on the once per person per day.

    Thank you for your help, I'll input this and test it out.
  4. JustinSC

    JustinSC Member

    I notice you're making separate arrays based on the names John and Fred. Would there be a way to convert the contact names to text, make an array of these names, check if the name is in that array, and if it isn't, then auto reply? At midnight, this array simply gets cleared, and the process starts over.
  5. electricpete

    electricpete Well-Known Member

    Yes, now that you mention it, it's probably not a good approach that I used to track who called.

    I think it would be better to use a string variable. Each time a call is received, check if the caller name is contained within the string variable. If not, then append the name and send the text . Clear string at midnight
    JustinSC likes this.
  6. JustinSC

    JustinSC Member

    It appears that Tasker doesn't want to change my notification volume. Looking online, it's apparently not just me getting this problem, as a lot of people with Jellybean are getting it. Hm.

    Anyways, I can't figure this 1 text per person per day out, any suggestions? I know that when they text me, I want to get their name with %SMSRF, what next?
  7. JustinSC

    JustinSC Member

    So, as it would seem, I have found a way to handle urgent texts. When I get a text with URGENT in it, I play a sound as media, not a ringtone. So that is good, now I simply have to figure out this array situation so people don't get attacked by auto replies.
  8. electricpete

    electricpete Well-Known Member

    Below is more details on my suggestion to do this simply using string matching. It may not be the most elegant but seems straightforward to me. It is the same as my previous routine, with changes highlighted in bold

    ReplyTask (393)
    A1: If [ %MMSRS ~ *urgent* ]
    A2: Notification Volume [ Level:7 Display:Off Sound:Off ]
    A3: Notify Vibrate [ Title:Urgent Sms Text: Icon:<icon> Number:0 Pattern: Priority:3 ]
    A4: End If
    A5: Variable Set [ Name:%MatchString To:*%SMSRN* Do Maths:Off Append:Off ]
    A6: If [ %NameList ~ %MatchString ]
    <Done if repeat caller>
    A7: Stop [ With Error:Off Task: ]
    A8: End If
    A9: Send SMS [ Number:%SMSRF Message:Sorry - you are not important to me...try again later, much later. Store In Messaging App:Off ]
    <Append new name>
    A10: Variable Set [ Name:%NameList To:%SMSRF Do Maths:Off Append:On ]



    Profile: CounterReset (394)
    Time: From 00:00 (to 00:00?)
    Enter: Anon (395)
    A1: Variable Set [ Name:%NameList To:BLANK Do Maths:Off Append:Off ]

    Profile: Wed (392)
    Day: Wed
    Event: Received Text [ Type:Any Sender:* Content:* ]
    Time: From 13:00 Till 17:00
    Enter: ReplyTask (393) (see above)

    Profile: ThursFri (396)
    Day: Thu or Fri
    Event: Received Text [ Type:Any Sender:* Content:* ]
    Time: From 09:00 Till 17:00
    Enter: ReplyTask (393) (see above)

Share This Page