Send messages to WhatsApp via an AppleScript
Make sure you have a Google Chrome's tab opened at https://web.whatsapp.com/ and it's properly logged in.
Then, inside the repository directory, run the AppleScript as following:
osascript whatsapp.scpt <conversation title> <message>
Example:
osascript whatsapp.scpt 'Friend Name or Group Title' 'This is a message sent via an AppleScript ;P'
- Google Chrome
- WhatsApp Web
- AppleScript
- JavaScript
The JavaScript file responsible for selecting the conversation, writing the message and sending it through WhatsApp Web.
The AppleScript which loads the JavaScript and runs it on the correct Google Chrome's tab.
- Check if tab is open; if not then open it.
- Implement delays and timeouts.
Victor Torres [email protected]