This is my first macro. It is messy and imperfect. Suggestions are welcome.
The idea is to use my iPhone to text my son on his 3 messaging platforms -- iMessage, Discord and Snapchat -- with the same message, at the same time.
I tried to create an iPhone macro in Shortcuts, but due to limitations in scripting for Discord and Snapchat (or my limitations as a novice), that was a no go.
So, I used a combo of (i) Keyboard Maestro, (ii) iPhone Shortcuts, and (iii) Apple Continuity, to create a macro that mostly works.
These messy processes are trying to address (a) iMessages, which has robust support for scripting on the iPhone and Mac, (b) Discord, which has clients on iPhone and Mac but poor scripting support on both, and (c) Snapchat, which only has an iPhone client that has poor scripting support.
I encourage forum participants to share how this could be more elegant because this is an ugly, incomplete solution.
- First, I wake my Mac because I realized that passing data to the Mac's system clipboard from the iPhone does not always work if the Mac screen is off. To do this, I created an iPhone Shortcut that triggers a remote Keyboard Maestro macro, which in turn
- via Keyboard Maestro, wakes the Mac, and then moves the mouse in case it is resting in my lower-right screen corner that puts the Mac to sleep.
I use the iPhone Shortcuts app to Ask for [text] with [Prompt]. My answer, 99% of the time, is "Time for Dinner!"
Next step, "Copy [Provided Input] to Clipboard.
Note: This is the point at which Apple's Continuity becomes important. This macro assumes that my iPhone and Mac are communicating on the same Wifi network. In other words, the clipboard on my iPhone is shared with the System clipboard on my Mac.
Next step, Wait 1 second. I added this because sometimes the macro moved too quickly.
Time to push the processes back to the Mac with a remote Keyboard Maestro trigger using a URL.
This is when the texting action takes place.
Keyboard Maestro elegantly handles using iMessage to text the contents of the System Clipboard.
Discord is not as simple. Discord has a client for the Mac, so I used the "Move and Click" commands in Keyboard Maestro to click on the location for "Home", then my son's "Direct Message" name, and then the text entry bar to text my son. Then, Keyboard Maestro again pastes/texts the contents of the System Clipboard.
- Since Keyboard Maestro is done with its tasks, the iPhone returns to the Shortcuts macro and completes the last step, which is loading Snapchat. I could not figure out how to automate, so I manually click on texting and paste the clipboard, which continues to be the same message and hit return.
Thoughts? Recommendations? No need to pull punches if this is awful and you would do it differently.