Automatic-Whatsapp-message

2017/05/05 - Android 6 (CM13), I have tried everything possible but could not get this to work, I have searched the internet and NOTHING. Every time the task crash after the Shell command, If I step through and have unticked Use root then it works, BUT does not matter if I tick or in tick the Run as root option it fail when I run it.
NOTE input tap seems to fail ONLY once an app is open, if it is the first line in my task then it action, else it fail

This profile will automatically send a Whatsapp message to a contact when you are near a wifi network. It has a 24h cool down period, so it will only send a message once a day. This profile was adapted from whatsapp-send-message, but excludes the voice input features.

Profile: Whatsapp Send (3)
Cooldown: 86400
State: Wifi Near [ SSID: "insert your SSID here" MAC:* Capabilities:* Min. Activate Signal Level:0 Channel:0 Toggle Wifi:Off ]
Day: Mon, Tue, Wed, Thu or Fri
Enter: Whatsapp Send (2)
A1: Launch App [ App:WhatsApp Data: Exclude From Recent Apps:Off Always Start New Copy:On ]
A2: Wait [ MS:300 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A3: Run Shell [ Command:input tap 720 150 Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]
A4: Wait [ MS:300 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A5: Type [ Text:Your contact here Repeat Times:1 ]
A6: Wait [ MS:300 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A7: Run Shell [ Command:input tap 850 150 Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]
A8: Run Shell [ Command:input tap 680 430 Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]
A9: Wait [ MS:300 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A10: Run Shell [ Command:input tap 590 1700 Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]
A11: Type [ Text: "Insert your text here" Repeat Times:1 ]
A12: Run Shell [ Command:input tap 1000 880 Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]
A13: Wait [ MS:181 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A14: Go Home [ Page:1 ]

The input tap coordinates are for a Moto G4. If you want to find out your own coordinates, enable pointer location in developer options.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License