Nightmare loop in KM

I’ve been working on a macro for awhile and had all the pieces in place for it to work exactly as I wanted except for the trigger: it worked well with a keyboard shortcut but I wanted it to launch at login. I tried a bunch of different things: conditions and pauses and pausing until a particular application was in front. Long story short: it got into this weird feedback loop in the Stickies app where the Edit tab flickered on and off for at least a minute and bizarre bits of text copied onto the sticky, it spoke the text out loud, then deleted then flickered on and off in this wacky way. Meanwhile, I couldn’t get it to stabilize long enough to stop the macro from running. I finally had to go into System Preferences to stop the KM engine from starting at login, but when I tried to start KM editor to get rid of the macro (which by sicko coincidence I named “Speed Demon”), the engine launched and then the whole possession thing started all over again. I’ve just moved KM to the trash. A weird residual problem: after dumping KM, I couldn’t type keystrokes but could move my cursor. When I shut down, then powered up again, everything was back to normal, minus KM of course.

I share this tale of woe with the forum because I imagine that the complexity of KM leads to bizarre cross-talk among apps etc.

So where am I? I imagine I need to reinstall. But I certainly don’t want to start the cycle all over. How do I trouble-shoot this?

Here are my tech specs: I’m working on a 12" Macbook running 10.12.6 and I just installed KM 8, but don’t have the full version number because it’s in the trash and I’m spooked about opening it again to find out.

Thanks much!

If you hold all the modifiers down (command,control,shift,option, or in v8, you can skip the command key), and click the Keyboard Maestro status menu, it will cancel all the running macros.

You can also quit the Keyboard Maestro Engine from the status menu.

If you launch Keyboard Maestro (editor) with all the modifiers down, it will not launch the Keyboard Maestro Engine (indeed, it will quit any running engine).

1 Like

I was looking for that in the KM Wiki, in the troubleshooting section, but didn't see it. We need to add it.

Also, is there any way to export a macro without running the KM Editor?

I added it to [How do I cancel a running Macro?] in the User Manual (https://wiki.keyboardmaestro.com/manual/How_do_I#How_do_I_cancel_a_running_Macro)

Based on that, I just added the following section to the Troubleshooting article:
Run-Away Login Macros

Hi Michael and Peter,
Thanks for this. I tried it, and alas, after moving KM from the trash, the problem persisted. Pressing the modifier keys had zero effect. So I moved it to the trash again and had to shut down my laptop with the power switch. What do you suggest now? A clean re-install?
I felt like I was just starting to get the hang of it, but now I’m a bit spooked.
Thanks,

Did you try the steps from the above link:
Run-Away Login Macros

Before you try anything else, you might do this:

Read carefully the entire process before you start.
If you have any questions or doubts, ask us first.

  1. Backup your KM Macro file located at:
    /Library/Application Support/Keyboard Maestro/Keyboard Maestro Macros.plist
  • Search you Mac for "Keyboard Maestro.app", and delete (move to trash) all copies.
    • This will also remove the "Keyboard Maestro Engine.app", which is in the "Keyboard Maestro.app" package.
  • Download and install KM from Keyboard Maestro 11.0.2: Work Faster with Macros for macOS
    • Be sure to install/move the Keyboard Maestro.app file to your standard Applications folder.
  • But do NOT start/launch KM yet.
  • Goto Mac System Preferences, and remove the "Keyboard Maestro Engine" from your login items.
  • Now Hold down ⌘⌃⌥⇧ (that's Cmd-Control-Option-Shift) and click on the Keyboard Maestro app in the Dock, or double-click in the Applications folder, to launch the KM Editor without starting the KM Engine.
  • Locate the problem Macro, and:
  • You might want to disable, or remove the trigger for ALL macros that have a login trigger.
  • To be safe. export ALL of your macros to a file.

Now that you have disabled or removed the login trigger from all macros, you can try starting the KM Engine from the KM Editor. GoTo File > Start Engine

Let's know how it goes. Good luck.

Dear Michael,
The initial trouble-shooting steps worked — hooray! And thank you. I think I panicked with all the screen jumping around, but things now seem to be back on track, though I did decide to delete the one evil macro and rebuild from scratch. And now I have new trouble-shooting tips.
One question though: is there a way to test login triggers without having to restart your laptop? It doesn’t feel healthy to keep having to shut down and start up again. FWIW, I’m trying to have it launch once I’ve logged into my admin account. I’ve tried “login trigger” and at “engine login”.
thanks again,

That's great! You are very welcome. I know how it feels when it seems like you have an uncontrollable situation.

Have you tried to just logout / login?

If one of the above posts solves your problem/question as originally stated, please check the "Solved" checkbox (click for details) at the bottom of that post.

Otherwise, please post your remaining questions/issues about this problem.
If you have other questions, please start a new topic.

Just add a Status Menu trigger, quit everything appropriate, and then run the macro from the Keyboard Maestro Status Menu.