AutoShortcut Can I modify "shortcut Intent String" depending on a variable?

Discussion in 'AutoApps' started by Traste, Aug 10, 2015.

  1. Traste

    Traste New Member

    Joined:
    Aug 10, 2015
    Messages:
    9
    Likes Received:
    0
    Hi,

    I'm using WhatsTasker to get the user ID of a WA contact. So, when I run a task with autoshortcut this is what I get on intent string:

    #Intent;action=android.intent.action.MAIN;launchFlags=0x14000000;component=com.whatsapp/.Conversation;S.jid=XXXXXXXXXXX%40s.whatsapp.net;S.displayname=Name%20SecondName;end

    How can I use a variable instead of "XXXXXXXXXXX%40s.whatsapp.net". This way I could open up the specific chat. Thanks!
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Just use the variable :) Nothing special about it
     
  3. Traste

    Traste New Member

    Joined:
    Aug 10, 2015
    Messages:
    9
    Likes Received:
    0
    Hi, thanks but it's now working. This is my task setup:

    A1: WhatsTasker Search Contact. It recognizes the name from Autovoice and returns the contact ID: variable %wt_searchresults()
    A2: Popup: Text: %wt_searchresults() (works well, popup shows contact ID.
    A3: AutShorcut. Intent string:

    #Intent;action=android.intent.action.MAIN;launchFlags=0x14000000;component=com.whatsapp/.Conversation;S.jid=%wt_searchresults();end

    Not working :-(
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    What happens if you use a popup with the text #Intent;action=android.intent.action.MAIN;launchFlags=0x14000000;component=com.whatsapp/.Conversation;S.jid=%wt_searchresults();end?
     
  5. Meartan

    Meartan New Member

    Joined:
    Mar 17, 2015
    Messages:
    5
    Likes Received:
    2
  6. Traste

    Traste New Member

    Joined:
    Aug 10, 2015
    Messages:
    9
    Likes Received:
    0
    T
    Thanks, it's working now, but I don't whether it works because I'm using Autoshorcut Pro now or because I modified the intent to:
    #Intent;action=android.intent.action.MAIN;launchFlags=0x14000000;component=com.whatsapp/.Conversation;S.jid=%wt_searchresults();S.displayname=%name;end
    However, this task is not stable. It works a couple times, then it opens up WhatsApp main chat window :-( But that's now because of your app. Thanks!
     
  7. Traste

    Traste New Member

    Joined:
    Aug 10, 2015
    Messages:
    9
    Likes Received:
    0

Share This Page