Deprecated: Return type of I::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 62

Deprecated: Return type of I::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 91

Deprecated: Return type of I::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 71

Deprecated: Return type of I::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 101

Deprecated: Return type of I::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 53

Deprecated: Return type of Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/collection.php on line 80

Deprecated: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/url.php on line 135
One Tap Less | Sending images to your Mac with Command-C and Keyboard Maestro

Sending images to your Mac with Command-C and Keyboard Maestro


Deprecated: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/public/kirby/toolkit/lib/html.php on line 107

I use Command-C all the time while at these articles to bulletproof my actions back and forth between my writing environment. I haven't viticcized my workflow yet and still prefer to write on my faithful Macbook Pro. Dealing with images relies on CameraSync and Dropbox uploads, it is not ideal and I saw a chance to improve this using Command-C extensive support, which also includes images.

If you don't know Command-C yet, it is a terrific app that lets you share text, images and links across your Apple devices in your local network.

This is a simplified version for an action Eric Pramono has published on Command-C's release. We're going to use Launch Center Pro's integration with the clipboard and your photos to grab a picture, send it to the clipboard and trigger Command-C to send it to our Mac.

Images to Mac:

launch://x-callback-url/clipboard?attach=photo:last&x-success={{command-c://x-callback-url/copy?deviceName=Phillip%27s%20MacBook%20Pro}}

This action will grab the last picture and send it to your Mac in the blink of an eye. Of course, you can tweak this action, if you need more options to select an image, you can just use the photo parameter alone, which will single-handed prompt you to select a preferred method.

You can also use a [list] to select between multiple devices, pretty much as Eric did in his much more complex action. Also, LCP's image manipulation allows you to change your photo slightly, customizing its quality with percentages and its dimensions.

Images to Mac with Quality 80:

launch://x-callback-url/clipboard?attach=photo:last&quality=80&x-success={{command-c://x-callback-url/copy?deviceName=Phillip%27s%20MacBook%20Pro}}

This one will attach the last photo to the clipboard with 80% quality, a great compression for publishing on the web.

However, after you sent your picture through your local network, it arrives and stays in your clipboard, where it doesn't have much use while you're writing, right? So I created a Keyboard Maestro macro to save this image on my Desktop, so I can just keep writing and deal with this image later.

I created this macro to, while Byword, my favorite writing app on the desktop, is active, it will check the clipboard every minute for images, then it will create a naming pattern based on the current time and save the clipboard image in the Desktop, deleting the clipboard entry afterwards.

First I created a folder exclusive for Byword actions, only available in the application. This action uses the Application trigger, checking if Byword is active and repeating the action every 1 minute. Then we execute our action, the first step is to check if there's an image in the clipboard, so we use an if/else clause, where you'll find a handy trigger, If all of the following conditions are true: The clipboard has image.

Then we set a variable, I like to call it datetime. You could actually skip this one and jump straight to write into a file, but I feel this is more organized. I use an ICU Date Time string, which lets me change the output to something like: Image_0427071934, which is Image_%ICUDateTime%MMddhhmmss%, weird string, right? But if you take a good look into it, you'll spot the pattern: month, day, hour, minute and second.

Next we write our clipboard into a file in the desktop with the JPG format, Keyboard Maestro has a Write Clipboard to File to help you, I use the following path and yours is probably similar: /Users/Phillip/Desktop/%Variable%datetime%.jpg.

To assure we won't get multiple copies of the same image with different time stamps in the Desktop, we delete the past entry on the clipboard. You can even go one step further and set your clipboard to a perfect Markdown image you can just paste in your article as you type.

You can download the Keyboard Maestro macro here. Don't forget to get Command-C for only $3.99 at the App Store.