Suggestion: Keyboard Maestro App Subfolders

Hi @Ibnabouna Nested Folders is a very interesting idea as a way of organising Macros and which Macs they run on. But one potential problem that I can see, is it might lead to having several Macros that might be very similar to each other in different folders and sub folders. All those Macros would have to be individually edited each time you make a change which could make maintaining the Macro Library more work.

In my case (which I think is similar to yours in that I have a few different Macs all syncing the same Macro Library) I have found that I do want most of my Macros to be available on all Macs but that sometimes I want them to behave differently depending on which Mac they are running on. For this I use the Keyboard Maestro Action "Switch Case" within the Macro itself. This Action allows the Macro to do different things depending on the name of the Mac it is running on. Here is an example:

Example Switch Case - for Forum.kmmacros (40.8 KB)

In this example I want the Macro to click on a different part of the screen depending on whether it is running on my Desktop or Laptop. But it could be expanded to include more Macs.

I like this approach because I just have one Macro and one Group for each App (not a Macro for each Mac and not multiple Groups for the same App) and I can always add or remove Mac names as and when I get more Macs. So, I only have one Macro to be maintained and edited if I need to make changes or improvements to it in the future.

In the above example one Mac is called "Desktop Mac" and the other "Laptop Mac" but you would change those names to at the actual names of each of your Macs - and it can be expanded to include as many Macs as you like as in the image below:

Oh, and one other thing. The last bit of the Switch Case Action is left like this:

This means that if the Macro is accidentally run on a Mac that I don't want it to run on (i.e. not one of the named Macs) the Macro will do absolutely nothing. This is also what make this a very robust solution and one that I have used for a few years now.

3 Likes