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 | Improving the Prizmo and Command-C integration

Improving the Prizmo and Command-C integration

Yesterday I linked to a really cool Launch Center Pro action that would take a scan from Prizmo and send the OCR'ed text to your Mac using Command-C. I thought the idea was so great I decided to tweak it a little, allowing you to send the text to any of your devices.

By now you probably already got a Command-C action in LCP in which you can select the device you want to share your clipboard to using a [list], if not, I'll share mine here:

command-c://x-callback-url/copy?deviceName=[list:Pick your Device|Macbook=Phillip’s MacBook Pro|iPhone=Phillip's iPhone]&x-success=launchpro://

Adjust the action to fit your devices and leave it there, we'll get back for it soon. In his action, @benoitsan would trigger the Prizmo action and select a language from a [list], I'll reproduce that and also replace the destination from url to pasteboard. This is how the Prizmo part of the action looks like while supporting English and Portuguese:

prizmo://x-callback-url/captureText?language=[list:Select the language|English=en|Português=pt]&destination=pasteboard

Each one of these actions use a feature exclusive to Launch Center Pro, a [list], so how could we attach them into a single workflow? Using launchpro://?url and some encoding tricks. First, send your Command-C action to TextTool and url encode it. It will look like this afterwards:

command-c%3A%2F%2Fx-callback-url%2Fcopy%3FdeviceName%3D%5Blist%3APick%20your%20Device%7CMacbook%3DPhillip%E2%80%99s%20MacBook%20Pro%7CiPhone%3DPhillip%27s%20iPhone%5D%26x-success%3Dlaunchpro%3A%2F%2F

Prepend launchpro://?url= to your encoded Command-C action and wrap the whole thing in curly brackets. The just include the outcome as the x-success parameter for Prizmo:

prizmo://x-callback-url/captureText?
language=[list:Select the language|English=en|Português=pt]&
destination=pasteboard&
x-success={{launchpro://?url=command-c%3A%2F%2Fx-callback-url%2Fcopy%3FdeviceName%3D%5Blist%3APick%20your%20Device%7CMacbook%3DPhillip%E2%80%99s%20MacBook%20Pro%7CiPhone%3DPhillip%27s%20iPhone%5D%26x-success%3Dlaunchpro%3A%2F%2F}}

This is how it rolls: you trigger this action from Launch Center Pro, it will prompt you for the language of choice, Prizmo will open in Camera mode, then photograph your document and wait until Prizmo finishes the OCR. Close the content window and you'll bounce back to LCP, this time you're prompted to select the device you want to send the text to, then Command-C opens, shares the clipboard with the chosen device and returns to LCP, where it all started. Happy scanning.