Launch iOS Actions from the Mac using Alfred and Command-C(▼)(▲)
January 17, 2014
By now, I'm sure you know that Command-C can send text/images from Mac to iOS. The problem with this built-in feature is the clipboard data still floats around the iOS pasteboard. What if we could put the clipboard data, assuming it's in text format, straight into Drafts instead?
To do this, we need to use the copyAndOpenURL action from Command-C. And, instead of sending just a string of text, we will send a Drafts URL Scheme instead. We can write the URL Scheme to create a new post in Drafts containing the text that's being sent from Alfred prompt.
But, we don't need to stop here. We can go even further by triggering any action that we already have installed in Drafts. All we need to do is define a delimiter to split the text we put in Alfred prompt into the text and action parameters of the URL Scheme.
My use for Command-C is unfortunately limited by the fact that it only works over local WiFi networks, rendering it useless for me in both my Dorm and at the coffee shops where I usually go to work. Still, there is some really powerful potential in this if you work in an environment with the right WiFi. You can launch any type of URL action from these workflows, so beyond Drafts you could also run Python scripts from Pythonista on your text, send it right into an Editorial workflow, or leverage any other app that has a URL scheme.