![]() In the shortcut, the JSON can be coerced into a dictionary using the Get dictionary from action. With the KM macro Execute Shortcut action, JSON data can be transferred to a shortcut via the With input from setting and retrieved in the shortcut via the Shortcut Input. To my delite, I discovered the following: Since I’m a big fan of Keyboard Maestro Dictionaries and since I’ve also used them extenstively within shortcuts, I was curious if they could be used in the aforementioned Execute Shortcut action with the With input from and Save to variable settings. If it does exist, the the action will overwrite the variable value. The Set Variable action (provided by the Keyboard Maestro application) will create a global, local, or instance variable if it does not exist in the macro. When writing a macro variable in a shortcut using the Set Variable action (provided by the Keyboard Maestro application), the KM variable must be global unless the %ExecutingInstance% is provided by the macro and used in the shortcut action. When reading a macro variable in a shortcut using the Get Variable action (provided by the Keyboard Maestro application), the KM variable must be global unless the %ExecutingInstance% is provided by the macro and used in the shortcut action. If a shortcut ends with a Text action (or Stop and output –Text action), the text value is passed back to a KM macro and retrieved using the Execute Shortcut action, Save to variable setting. With the KM macro Execute Shortcut action, text data can be transferred to a shortcut via the With input from setting and retrieved in the shortcut via the Shortcut Input. During that testing, here's what I initially found: As I started testing, I was primarily interested in the methods to transfer data. However, the podcast episode and a recent post here, Getting Started with macOS Shortcuts, motivated me to give it a try. I've written many shortcuts (primarily is iOS) and Keyboard Maestro macros, but I hadn't taken the time to explore this new interoperation (available in KM v10.1+). It's outstanding and I'm sure many of you would find interesting.Īt 53:05 in the episode the hosts, Rosemary Orchard and David Sparks, laud Keyboard Maestro for its comprehensive support of macOS Shortcuts. Update: Please note that this post and the comments in the example macros and shortcuts have been updated based on information provided by latest episode of the Automators podcast is entitled Automation Interoperation. reported that the macros and shortcuts below behave as expected using Monterey 12.5. ![]() I'm currently using Ventura 13.0, Developer beta 3 (22A5295i). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |