Whatsapp

862 views
Skip to first unread message

Travis Salha

unread,
Jun 26, 2013, 4:58:46 PM6/26/13
to tas...@googlegroups.com
I'm hoping someone can help me figure out how to pass a variable to a shortcut which has been created in Tasker using AutoShortcut.  I've been daisy chaining a few features (tasker, autoremote, eventghost, etc) and wrote a desktop program which allows me to receive my Whatsapp messages on my computer and allows me to reply back to my phone.  The last bit I need to solve is to get my reply back into Whatsapp.  I've used AutoShortcut to create a shortcut directly to a contact which is what I need except for one bit.  (I can see that the relavent code in the xml is below.)

<intent>~Intent;launchFlags=0x14000000;component=com.whatsapp/.Conversation;S.jid=447912345678%40s.whatsapp.net;S.displayname=NAME;end,</intent>
<intent-type>java.lang.String</intent-type>

I now need to replace the phone number bolded above with a phone number I pass on through a variable.  I can't find anywhere how I'd replace this bit in the xml with a variable.  Any help would be greatly appreciated.

Thanks

Matt R

unread,
Jun 27, 2013, 1:08:46 PM6/27/13
to tas...@googlegroups.com
I think what you need to do is use Tasker's send intent action instead of autoshortcut. You may need to Google around to find all the right info for the intent.

Matt

joaomgcd

unread,
Jun 28, 2013, 5:15:34 AM6/28/13
to tas...@googlegroups.com
Hi Travis.

You're actually almost there! :)

Just put in the variable name where the number is, re-import the task and you're done!

Cristian Gradisteanu

unread,
Jun 30, 2013, 6:48:19 PM6/30/13
to tas...@googlegroups.com
I am curious, how do you actually send the message with Whats'app? By simulating the key press event or found another clever solution to this? 

Ari Fanuch

unread,
Jul 4, 2013, 8:34:12 AM7/4/13
to tas...@googlegroups.com
I would genuinely like this feature too, have you gotten it worked out?

Richard Bean

unread,
Aug 28, 2013, 7:55:10 AM8/28/13
to tas...@googlegroups.com
Awesome. This works for me, I replaced 447912345678%40s.whatsapp.net with a variable named %WAid(%count) and NAME with %WAname(%count).

I have a whatsapp reader task based on the sqlite script on this page: http://technologyworkroom.blogspot.co.uk/2013/05/tasker-how-to-read-out-whatsapp.html
that stores the last 5 whatsapp messages i recieved, along with the sender (%WAname), the time and the senders ID (%WAid). 

Using these two tasks I've created a whatsapp widget with zooper that shows the last 5 messages, and loads the conversation when clicked.

Richard Bean

unread,
Aug 28, 2013, 8:00:34 AM8/28/13
to tas...@googlegroups.com
Is there anyway to enter default text into the converstaion once its loaded?

Richard Bean

unread,
Aug 28, 2013, 8:27:29 AM8/28/13
to tas...@googlegroups.com
After loading up the converstaion I simply add the following actions to the task:

Input>Type (SOME TEXT)
Input>DPad (RIGHT)
Input>DPad (PRESS)

and it auto sends the 'some text'.

Badhri Narayanan

unread,
Sep 30, 2013, 5:31:19 PM9/30/13
to tas...@googlegroups.com
Hi Richard,

I'm curious to know how you got this thing to work. Through Tasker's Send Intent action ?  If possible, please elaborate on this .. I'm particularly interested to know how the following thing
"
<intent>~Intent;launchFlags=0x14000000;component=com.whatsapp/.Conversation;S.jid=447912345678%40s.whatsapp.net;S.displayname=NAME;end,</intent>
<intent-type>java.lang.String</intent-type>
"
got transformed into a working intent.

Thanks in advance.

Julio García Muñoz

unread,
Dec 4, 2013, 6:01:48 PM12/4/13
to tas...@googlegroups.com
Just in case somebody stumbles upon this old thread...I made a free plugin to automate intercepting WhatsApp notifications and sending messages. Feel free to give it a try:

jeson zale

unread,
Nov 11, 2023, 8:05:52 AM11/11/23
to Tasker
Is there anyway to enter default text into the converstaion once its loaded?


Yes, it may be possible to enter default text into a conversation once it is loaded in certain messaging apps or platforms. However, the feasibility and methods for achieving this can vary depending on the specific messaging app or platform you are referring to.

In the context of WhatsApp, which you mentioned in your previous message, the application does not provide a built-in feature to enter default text into a conversation once it is loaded. The input field in WhatsApp is designed for users to manually input their messages.
Message has been deleted

FM Whatsapp

unread,
Feb 1, 2024, 10:20:47 AMFeb 1
to Tasker

Certainly! To pass a variable to a Tasker shortcut created with AutoShortcut, modify the XML code as follows:

```xml
<intent>~Intent;launchFlags=0x14000000;component=com.whatsapp/.Conversation;S.jid=%YOUR_VARIABLE_HERE%@s.whatsapp.net;S.displayname=NAME;end,</intent>
<intent-type>java.lang.String</intent-type>
```

Replace `%YOUR_VARIABLE_HERE%` with the variable containing the desired phone number. This adjustment allows dynamic assignment of the phone number based on the Whatsapp variable you pass through, ensuring flexibility in your Tasker automation.

John Dolan

unread,
Apr 15, 2024, 4:16:35 AMApr 15
to Tasker
  Certainly! To pass a variable to a Tasker shortcut created with AutoShortcut, modify the XML code as follows:

<intent>~Intent;launchFlags=0x14000000;component=com.whatsapp/.Conversation;S.jid=%YOUR_VARIABLE_HERE%@s.whatsapp.net;S.displayname=NAME;end,</intent>
<intent-type>java.lang.String</intent-type>

Replace %YOUR_VARIABLE_HERE% with the variable containing the desired phone number. This adjustment allows dynamic assignment of the phone number based on the Whatsapp variable you pass through, ensuring flexibility in your Tasker automation.


Reply all
Reply to author
Forward
0 new messages