MACRO: [KMFAM] Favorite Actions and Macros v1.4 Released 2021-12-09

Thank you so much Dan. This macro is phenomenal like all your other macros. You really make some really slick tools.

However the macro stopped working for me. Perhaps it is because I have minimised the window where you add the macro and after quit KM. Now none of the triggers work and I don’t know how to fix it. What can I do to fix this?

Thank you.

Nope. It just beeps. This one I can handle - I just check to see if the title field is focused, and if so, tab to the next field. I’m assuming this would happen mostly because it’s a new macro.

Interesting. I have a couple of thoughts.

First, in a temporary macro of some kind, add a "Semaphore Reset" action, with the name of the semaphore "kmfamSemaphore" (without quotes) like this:

Then run the temporary macro (or just select the action and click "Try"). Let me know if this solves the problem, because if it does, I have some questions for Peter. :wink:

If you still have a problem seeing the Select window, go into Keyboard Maestro's Preferences, to the "Variables" tab, then find and delete the variable "DND__kmfamWindowPosition". Again, let me know if that solves the problem, so I can fix that issue.

Let me know. Thanks!

1 Like

Yes! Yes!! Yes!!! I never met another developer with this obsession and the problems that it causes. My argument was always that the time I spent on tools would be paid back in faster work, not just for this project, but for future ones, and especially when other people use them. Didn’t convince anyone much. Suffered a lot of criticism over this, sometimes with serious consequences, but I was never able to stop.

1 Like

OMG! The first developer I ever talked with who understands - I mean truly understands. What you typed is exactly how I feel.

To be honest, for quite a while at Disney I did get some leeway to work on some of this stuff, but I probably took it too far. :slight_smile:

1 Like

This is a double edged sword though. Especially spending a lot of time on micro optimisations, it becomes kind of addicting trying to shave off a few seconds there and there and often is just an example of procrastination. So I think one should really strike a good balance between automation and trying to automate things for the sake of automating, a balance that is often quite hard to find in my opinion. For me, keyboard customisation and working on optimising my personal workflow is kind of like a hobby. I enjoy trying out new things and seeing what works best for me.

I don’t know about you but I am more and more amazed and joyous when I sit down and get to use my laptop. All of these micro and macro optimisations and a wonderful list of applications that exist on this platform are just superb and it is an endless fun in itself trying to make use of them and especially bring them together in a way that works best for you. Without KM, BetterTouchTool, Karabiner, PopClip, Typinator, Bartender I would really find it a hard time trying to make myself use all of these tools and apps in a way that is efficient and usable.

I am actually curious, what other tools do you guys use aside from Keyboard Maestro that you enjoy and love? Perhaps I should make another topic post with this question.

1 Like

Oh wow, thank you. This magically worked. I am actually curious what it does. :slight_smile:

Which part worked?

Just making a macro with an action of Semaphore Reset. I triggered it and everything started working.

@peternlewis Peter - We had a situation where a Semaphore didn’t get unlocked. You can wade back through if you want, or here’s the gist:

While one of my my macros was running, which had a semaphore locked, @nikivi shut down KM. The semaphore didn’t get unlocked. I can’t duplicate this on my machine, so I’m not sure what happened.

Got any ideas?

PS to @nikivi: A semaphore is something that can only be locked by one process at a time. I lock the semaphore at the start of a KMFAM macro, and it should automatically get unlocked when the macro finishes. This way I make sure that only one KMFAM macro runs at a time. Otherwise, some variables might get confused. (If you need specifics, let me know.)

Dan, is it possible to use your macro, or one of it’s sub-macros, in another macro to insert one or more Actions at a specific point?

Can you give me an example? I always understand better with concrete examples, even if they’re made up.

Suppose I have a macro that inserts Actions using the KM menu, but at some point I want to use one of my Fav Actions.

I think @MitchellModel has a use case here:

I don’t have an immediate need, or even a long term need at this point.
I was just asking for information, not to suggest that you develop this capability if it does not already exist.

Can you give me a specific example? The reason I’m asking is that it’s conceivable this is something I have on the backburner, but I want to make sure it’s the same thing.

Actually, I have a set of utility macros that I’ll clean up and post. They’ll help do all of these types of things easily.

I’ll get them done in the next day or so.

I would if I could, but I don’t have a current use case, let alone a sample macro.
I was just asking for info.
If you don’t already have it, please don’t spend any time on it on my account.

No, I’ve been meaning to put these together for awhile. With a little direction, people can really do some fun stuff with this. It’s about time I do it.

Are we talking about the same thing?

If I copy an action, I can click on the macro (in the macro column), or in the text field of the macro name, and Paste will paste to the end of the macro.

I checked this works with 7.2.1, so it is not something I have fixed since then. So I’m confused.

Semaphores are not stored to disk. So my guess would be that the macro was actually still running in the Keyboard Maestro Engine, and by “shut down KM” all that happened was the Keyboard Maestro Editor was quit. If the Keyboard Maestro Engine was quit, then all semaphores would be reset.

I could be wrong, there could be some way for Semaphores to be left locked when the macros are all quit, but its unlikely as there is actually a safety feature built in so that whenever there are no macros running, if there are any semaphores still locked, they will be released with an error report in the log file.

1 Like

Yeah. I was thinking that same thing. I won’t worry about it unless it happens again.