AutoTools Wait for notification click in the same task that created the notificaiton (ie any AutoApps command)

Learn how you can wait for any AutoApps command and get the result in the same task

  1. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    806
    joaomgcd submitted a new AutoApps project:

    Wait for notification click in the same task that created the notificaiton (ie any AutoApps command) - Learn how you can wait for any AutoApps command and get the result in the same task

    Read more about this project...
     
  2. Wael

    Wael New Member

    Joined:
    Sep 15, 2016
    Messages:
    4
    Likes Received:
    0
    Hi.
    I followed your instructions but still can't receive the value of the notification button on the same task that created it.

    I added flash alerts after each step to see if any action stops executing. A flash confirms that the report action has completed, but I couldn't see any values set on the wait action variable (I added a flash action for the wait action variable, but it flashes the variable name %answer).
     
  3. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    806
    Can you please export your profile's description (not xml) so I can take a look? Long-click the profile in Tasker->export description Thanks in advance
     
  4. Wael

    Wael New Member

    Joined:
    Sep 15, 2016
    Messages:
    4
    Likes Received:
    0
    Code (Text):

    Test Notify And Wait (111)
        A1: AutoNotification [ Configuration:Use HTML: false
    Title: Testing Notifications
    Text: Are you feeling okay?
    Status Bar Text Size: 16
    Is Group Summary: false
    Skip Picture Cache: false
    Button 1: yes
    Label 1: Yes
    Icon 1: navigation_accept_dark
    Button 2: no
    Label 2: No
    Icon 2: navigation_cancel_dark
    Update Notification: false
    Only on Phone: false Timeout (Seconds):20 ]
        A2: AutoTools Action Wait [ Configuration:IMPORTANT: this wait will always time out if tested manually in a Task.
    Because of the way Tasker works, events won't trigger when a Task is being manually tested, so there's no way you can run the 'Action Report' Tasker action in a different task in this situation.
    You can only use this in a real, 'non-testing' situation.
    Request Id: autoappscommand
    Variables: %Answer
    Last Variable Array: false Timeout (Seconds):10 ]
        A3: Flash [ Text:%Answer Long:Off ]
        A4: Flash [ Text:Wooooho... I have done it... Long:On ] If [ %Answer ~ yes ]
        A5: Flash [ Text:Done Long:Off ]
     
     
    Last edited by a moderator: Oct 11, 2016
  5. Wael

    Wael New Member

    Joined:
    Sep 15, 2016
    Messages:
    4
    Likes Received:
    0
    That was the profile where I am using the wait action and below is the profile with the report action. Thank you for responding.
    Code (Text):

    Profile: Autoapps Wait To Report (82)
        Priority: 50
        Event: AutoApps Command [ Configuration:Case Insensitive: false
    Exact: false
    Regex: false
    Variable Array: false ]
    Enter: Report Action (100)
        A1: Flash [ Text:Reporting %aamessage Long:Off ]
        A2: AutoTools Action Report [ Configuration:Request Id: autoappscommand
    Separator: , Timeout (Seconds):60 ]
        A3: Flash [ Text:Done Reporting Long:Off ]
     
     
    Last edited by a moderator: Oct 11, 2016
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    806
    I think you forgot to set the Report Data field in the Report action :)
     
  7. Wael

    Wael New Member

    Joined:
    Sep 15, 2016
    Messages:
    4
    Likes Received:
    0
    Oh, I totally missed it, I am sorry.

    Thank you for the help...

    Your apps are awesome... :p
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    806
    Glad you got it! :)
     
  9. Dale

    Dale New Member

    Joined:
    Mar 3, 2015
    Messages:
    2
    Likes Received:
    0
    Followed your process and all worked as expected except when I added a cancel notification the Tasker shortcut was deleted.
    Wait For Notification (101)
    A1: AutoNotification [ Configuration:Title: Are you sure?
    Text: Do you really want to do that?
    Status Bar Text Size: 16
    Button 1: yes
    Label 1: Yes
    Button 2: no
    Label 2: No Timeout (Seconds):20 ]
    A2: AutoTools Action Wait [ Configuration:IMPORTANT: this wait will always time out if tested manually in a Task.
    Because of the way Tasker works, events won't trigger when a Task is being manually tested, so there's no way you can run the 'Action Report' Tasker action in a different task in this situation.

    You can only use this in a real, 'non-testing' situation.

    Request Id: autoappscommand
    Variables: answer Timeout (Seconds):10 ]
    A3: Flash [ Text:The answer was yes. Long:Off ] If [ %answer ~ yes ]
    A4: AutoNotification Cancel [ Configuration:Notification Title: Are you sure? Timeout (Seconds):0 ]
    A5: Back Button
    Shortcut was deleted also when ID autoappscommand was specified.
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    806
    Sorry but AutoNotification can't delete home screen shortcuts. It must be something else in your system :(
     

Share This Page