Using Command-C with Launch Center Pro

Like Pastebot, Command-C lets you send the contents of your clipboard back and forth between your Mac and iPhone. You can also use it to send stuff between your iPhone and iPad. Best of all, it supports x-callback-url, which means you can use it with Launch Center Pro.

Here’s the Launch Center Pro action I use to quickly toss my clipboard to another device. Instead of having a separate action for each device, it lets me choose the target device from a list.

command-c://x-callback-url/copy?deviceName=[list:Choose Device|Mac=bluepolicebox|iPad=MiniMe]&x-source=Launch%20Pro&x-success={{launchpro://}}

Install this action. (Be sure to update the device names to match your own.)

I have a separate action that let’s me send freeform text to another device as well:

command-c://x-callback-url/copyText?deviceName=[list:Choose Device|Mac=bluepolicebox|iPad=MiniMe]&x-source=Launch%20Pro&x-success={{launchpro://}}&text=[prompt-return:Text to Send]

Install this action. (Again, be sure to update the device names to match your own.)

Got any other nifty Launch Center Pro tricks? Post them to Twitter with the hashtag #lcptips.

Playing with URLs in Launch Center Pro 2.3

This morning, I found myself wanting to clean a URL with Clean Links and then send the cleaned URL to another Launch Center Pro (LCP) action. You can chain LCP actions together now using the [action:##] tag that was introduced in LCP 2.3. This wasn’t as straight-forward as I had hoped it would be, but the solution I came up with works really well. I’d love to see if there’s a simpler implementation.

The workflow looks like this:

  • Copy URL
  • Open LCP and fire the clean-link action
  • Clean Links strips the cruft out of the URL, places it on the clipboard, and returns to LCP
  • LCP then calls another action to do further processing on the contents of the clipboard

Here’s what the resulting LCP action looks like:

clean-links://x-callback-url/clean?url=[clipboard]&x-success={{launch://x-callback-url/clipboard/?text=[clipboard]&x-success=[action:10]}}

First, we pass the URL on the clipboard to Clean Links. It passes back the cleaned URL on the clipboard and returns to LCP via the x-success parameter.

From there—and this is where it gets hacky—we tell LCP to call an internal function (/clipboard/) to place the current contents of the clipboard onto the clipboard. This is necessary so we can then use the x-success parameter to call action number 10, which is what we’re really after.

Again, very hacky, but if you need to do something like this, it works really beautifully. If theres a better way to do it, I’d love to hear about it (@jeffmueller on Twitter and App.net).

Update: Here’s a much simpler version:

clean-links://x-callback-url/clean?url=[clipboard]&x-success={{launch://?url=[-action:10]}}

Thanks to Eric Pramono for the tip!