Create hotkey to activate 'insert trigger' within km window

Hey Michael,

Thank you for your help.

I think I have an identical macro as you and yet it does not work. It refuses to do the down arrow and return.

@nikivi, I moved the posts by you and @DanThomas to a new Topic, because it is a new subject. Please try to always start new subjects in a new Topic. Thanks.

1 Like

Did you disable these settings:

Yeah, I did. Have two crosses there as well.

What versions of KM and macOS are you running?

I’m running Keyboard Maestro 7.2.1 (7.2.1) on macOS 10.11.4.

A post was merged into an existing topic: How do I reference a variable in an applescript?

MacOS ver 10.11.6 and KM ver. 7.2.1

Here's my macro. Maybe you can try it.

###MACRO: [KM] Press Button to Add Trigger [Example]

[KM] Press Button to Add Trigger [Example].kmmacros (3.1 KB)

Oh wow, I just realised that both mine and yours work but there is a HUGE delay. Like minimum 5 seconds. This is rather unbearable, do you know why that might be and whether one could fix this?

I see the same delay.

Nope. As I stated previously:

For me, issues like this aren't worth the effort to resolve.
This is most likely something that @peternlewis would have to change, or better, give us a shortcut key to add a trigger.

I can just manually arrow down and press RETURN, easy enough.
So, for my use, I remove these Actions:

Yeah, I removed them as well. But since nearly all of my triggers are hotkey based it would be nice to cut down on those two clicks.

OK, @nikivi, just for you, I persevered a bit more. :smile:

I generally don't like to use "Found Image", but sometimes that is what it takes.

This works for me, and does so quickly:

Just copy/paste this image on your screen into the "Click at..." Action:

EDIT:
You may need to adjust the "fuzziness factor". Make it more fuzzy.

I also checked "Restore Mouse Location" on the "Click at .." Action so that the mouse will return to where it was after the macro is finished:

Oh wow, thank you Michael. This is kind of you.

This however doesn't work. Says no unique image is found. I dragged the image as you said.

Please carefully review my macro, and duplicate exactly.

In particular:

  1. The "Click at" Action MUST be set to "in the front window"
  2. Make sure this Action is closed before trying to run the macro
  3. Make sure all Actions are in the "If/Then" Action.

I have done everything correctly I believe :

Pretty sure I don't need the if clause since macro is in the group for KM only but have it anyway to make sure.

I am not sure about step 2 but I think I have tested it correctly too. Just created new macro and tried run the trigger. Say no unique image was found.

Troubleshooting:

  1. Did you copy the New Trigger image from your KM Editor, and then paste into the "Click at" action?
  2. Try adjusting the "fuzziness factor". Make it more fuzzy.
  3. As a test, hide everything on your screen except the KM app.

Problems like this is why I don't like to use "Found Image". :frowning2:

1 Like

Wow, that is a lot of messages. I’ll leave you all to read them, but will add this note:

The Press Button action is waiting for the press to complete, which in this case wont happen until the menu is dealt with.

If you want to ignore that fact, and complete immediately, then turn off all the notification/aborts, and set the timeout of the action to something very small (10 hundredths of a second for example).

Thanks for the response, Peter.

I tried that, except that I don't see any way to set the timeout of this action:

Is there some other way to do so?

Ahh. Darn. Looks like it is entirely synchronous, so the Engine is essentially locked up while it is stuck in there.

I don’t see any workaround for that I’m afraid, so looks like resorting to clicking is your best bet. Ugly.