You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Press Run to run this script, or Quit to quit.

Resurrecting this question as I was unable to reply on an older thread.


I first created an AppleScript that grabs the finder selection and turns the selected items into a list of URLs and then wraps each with "<" and ">" so that the URLs can be pasted into a text doc as markdown links. I then exported the script as an application.


I then installed Karabiner-Elements which allows me to create a "Hyper Key" - in my case I mapped the caps-lock key to simulate Cmd-Opt-Ctrl-Shift. I then used Keyboard Maestro to create a macro, "Ctrl-Opt-Shift-Cmd G" to trigger the aforementioned application.


In use, I select file(s) in the Finder, then simply hit caps-lock G, which Karabiner turns into Ctrl-Opt-Shift-Cmd G which Keyboard Maestro sees and triggers my application.


The problem is that I get a dialog each time: "Press Run to run this script, or Quit to quit." I have determined, based on the old thread, that the use of the Ctrl key in the macro triggers the dialog. Remove the Ctrl key and the dialog doesn't appear. Unfortunately, removing the Ctrl key defeats the point of using a "Hyper Key" which is that almost NO applications use the Ctrl-Opt-Shift-Cmd modifiers together in a keyboard shortcut - i.e., the Hyper Key opens up a lot more custom keyboard shortcuts to use as triggers.

Posted on May 6, 2022 2:22 PM

Reply

Similar questions

3 replies

May 8, 2022 2:29 PM in response to Roote

I know next to nothing about AppleScript and followed on online tutorial that had me export the script as an app. I just tried running the compiled script as suggested - this required revising the Keyboard Maestro action from "Open" to "Execute an AppleScript" - and the script now executes as expected without showing the dialog. Thanks Roote!


Note that I also had to go into System Preferences -> Security & Privacy -> Privacy -> Automation and add "Finder.app" to the "Keyboard Maestro Engine.app" entry to allow Keyboard Maestro Engine to control the Finder (not sure why I didn't need that before)...

Press Run to run this script, or Quit to quit.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.