AutoNotification Regex in Notification title doesn't work

Discussion in 'AutoApps' started by SGTAvocadosLHCB, Aug 11, 2020.

  1. SGTAvocadosLHCB

    SGTAvocadosLHCB New Member

    Joined:
    Aug 11, 2020
    Messages:
    2
    Likes Received:
    0
    I'm a one week old Tasker user and never had a single experience with programming or anything similar. Please be nice.

    I'm trying to build those basic projects everyone makes during their first experiments with Tasker: autorotate when opening an application (✓), silent at home (✓), and so on and so forth. Now I'm trying to build the Send my location via SMS or WhatsApp.
    A very wise man shared a similar project (I'd link it if I managed to find it), and I'm trying to modify it according to my needs. The problem is that I want the profile get triggered only by some people and I figured out how to do it with regex, but I can't make this part work. Everything else works, if I put only a single name with the exact match works, regex testers say that my expression works, but nonetheless when I put the regex expression in Notification title it stops working.

    Code (Text):
    Profile: Google Maps via SMS or WhatsApp (141)
    Cooldown: 5

    Event: AutoNotification Intercept
    [ Configuration:
    Event Behaviour: true
    Has Reply Action: true
    Notification Apps: WhatsApp,Messages
    Notification Title: (Wife)|(Dog)|(Godzilla) (regex)
    Notification Text: (?i)(?:Where\ are\ you\?) (regex) ]
    Enter: Send location (147)

    A1: Get Location v2
    [  Timeout (Seconds):60
    Minimum Accuracy (meters):20
    Speed (meters/second):
    Altitude (meters):
    Near Location: Enable Location If Needed:On
    Last Location If Timeout:Off Min
    Speed Accuracy (m/s): ]

    A2: AutoNotification Reply
    [ Configuration:
    Notification Apps: WhatsApp,Messages
    Notification Title: (Wife)|(Dog)|(Godzilla) (regex)
    Notification Text: (?i)(?:Where\ are\ you\?) (regex)
    Reply Text: %gl_map_url Timeout (Seconds):10 ]

    A3: Stop
    [ With Error:Off
    Task: ]
    Can you please help me spot the problem? I'm quite sure it's awfully stupid, but I really don't know what it could be.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,470
    Likes Received:
    796
  3. SGTAvocadosLHCB

    SGTAvocadosLHCB New Member

    Joined:
    Aug 11, 2020
    Messages:
    2
    Likes Received:
    0
    Hi João, thank you for the amazing job with Tasker. It's incredible, I mean it :)

    Tbh I feel a bit stupid now, but at the end of the day I managed to find out that most likely the problem is not with regex but with the trigger event. That means, the profile works how it is supposed to, as long as I trigger the events manually. Otherwise it's a shot in the dark, sometimes it works and sometimes it doesn't.

    Knowing that, do you still want me to try the Autonot version you uploaded?
     
: Help

Share This Page