Create hotkey to activate 'insert trigger' within km window

And yeah, I think I get what Dan is trying to say. I tried making this :

And it doesn't work for some reason. Perhaps I need to put a pause there.

This works for me, but there is a long pause (for some unknown reason):

You may need to use a UI script to click (press) the green plus:

1 Like

https://wiki.keyboardmaestro.com/manual/Scripting

The answer is there.

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.