I'm attempting to toggle the visibility of the clock in my menu bar via a keyboard shortcut and receive a "No Front Window Found" error when I trigger the attached macro. At the time the error appears, the correct window is the front-most and the only window visible on my screen.
I'm new to KM and therefor this might be related to my initial configuration. I have also not been successful being able to use the Select or Show a Menu Item action in other macros which prompt(which is why I'm assuming it might be a general configuration issue). I have turned on permissions for both KM and KM Engine in Accessibility>Privacy, have KM setup with Full Disk Access (but not KM Engine since it doesn't show up in a search) I'm running macOS 10.15.3 and KM 9.0.4 trial version.
Also note that my screen resolution is set to 1920x720 when the Macro was created and when it is applied (I use that setting when I record videos and want to hide the clock before I start recording).
I have also attempted to click the Lock icon in the lower left of the Date & Time preference pane and also receive a "no front window found" error, even though the window is open. If I manually unlock the pref pane and leave the window open before applying the macro, then the attached macro works. Note: in normal use, I am able to toggle the clock visibility without the need to unlock the pref pane.
As a general rule, you only need pauses before click actions, or after something that changes the focus, or occasionally after typing a large amount of text or otherwise performing lots of actions which can overwhelm the system.
There are other cases, and certainly for a failing macro it is useful to slow things down, if for no other reason than to see where things go off the rails.
You can certainly require pauses in other locations, and it will almost never hurt to add them and remove them later.
As a general rule, you should not need pauses after selecting a menu or pressing a button (using the actions) as they will generally be processed synchronously by the app, unless the button press results in a change of focus (or some other animating action).
Certainly if you perform some action that results in the application performing a task that takes appreciable time, then you will likely need a pause to account for that.
But again, I would say if you are having trouble with macro timing, the most logical places to put temporary pauses to debug the issue is before/after click actions, and after any focus change/animation causing actions.