Create Keyboard Shortcut (macro) to Copy Selected Macro Shell Script (osascript) to Clipboard?

Seems easy. All you need to do is get the macro itself to paste the value of %ExecutingThisMacroUUID% into the system clipboard.

You may not like my solution, but it's fairly easy. Just add a hotkey to your macro that puts the value of that token into the system clipboard. Like this:

Although this works, you may not like my solution. I can guess why, but there are things we can do ti fix your concerns with this solution.

One way to fix this is to add an IF action at the top of your macro that checks if the hotkey was pressed, and if so, then performs the action above, but if not, then performs whatever other code you want that macro to perform. But there are other ways besides this to make it work smoothly. If you tell me what you don't like about my solution, there's a good chance I can make it work more smoothly.

1 Like