This should mean that if I replace the keystroke action control + command + Right Arrow with the Select menu item action (Enter Action), I should end up with the same result. However, It resulted in this (missing a pause outside of “If then else”) and an error message:
If you are going to use KM to modify KM, which I advise against, you should at least be aware that this is a very difficult thing to do because the KM Editor has an autosave feature which can freeze the KM Editor for several seconds. This means that any fixed pause action, of which you have several, may suddenly not be long enough because of the time it takes the autosave to complete.
So if you really want to do this, you should modify your code to "wait" for the menu item to appear rather than assume that a 0.1 second pause is "always sufficient".
It's impossible for me to debug self-modifying code (my own or yours) because there's no way I can replicate your autosave timing. The timing of autosaves is unpredictable, inconsistent, and probably undocumented.
Im feeling adventurous and rebellious! Maybe one day I’ll finally realize myself it's not a good idea to modify KM (hopefully not haha)
Yup, that works! Wouldn’t that negate the auto-save issue then? And by extension, wouldn’t it work on any Mac with different autosaving timing?? (because it “waits” for the menu item to be enabled or disabled before moving on to the next action)
Asking a question that never gets old (for me -- maybe it does for you!) -- why?
There are reasons. Using your example: Perhaps this is part of a bigger macro that first "Prompt"s for a time, adds the actions, then changes all the "Pause" times to the number you entered in the "Prompt".
But if this is boilerplate that is either always the same or that you are going to change in the Editor anyway, "Favorites" is a far better way of doing this.
Obviously you know about Favorites, you're using them in this macro, but you may not have spotted that you can Favorite multiple actions as a single item (with or without Grouping them).
For the next level in automated macro-building -- Actions can be defined in XML, and if you load the System Clipboard with Action-defining XML then Paste into the Editor you'll add those Actions to the macro. Since that Paste is a single event you don't get the timing problems @Airy mentioned.
And since XML is just text it can be manipulated with other KM Actions, using prompts, conditions, variables etc to create the definition of the Action(s) to add to your macro. There's been a bunch of threads about this, either pasting in XML or even generating whole new macros with AppleScript, so have a search of the Forum for more.
If you want to control Keyboard Maestro itself, like any good AppleScriptable application you should use AppleScript which will be far less fragile to minor UI changes.
Creating Keyboard Maestro actions should be relatively straight forward with AppleScript.
It is part of a bigger macro I’m trying to make indeed. But not exactly what you said. Rather than dragging and dropping actions, I want to type out all the actions (including the settings of each action) at once. It’s almost like making my own programming language of sort (But much less sophisticated ofc). It’s a good way to practice the regex stuff I learnt recently and it’s help me make macros faster in the future, so two birds!
Yup Yup I came to know this when I started working on this little project of mine!
Oh great, you are hitting me with stuff I have never heard of again! I’ll look into this thing call XML! thx!