Keyboard Maestro Fails to Activate the App at Chosen Time

I have created a macro to trigger one certain app periodically during the day. It is supposed to start up an app every 30 minutes for 24 hours and I want to do this for a month or so. The macro works fine, however I have noticed that part of it does not run about 50% of the time. Is there something I am missing?

Can you share your macro with us please? Screenshot, or the share button within the editor


Thanks vincent_ardern for your interest.
I find it interesting that when I first created the macro, I only created one "activate' order, however on viewing the macro now, it has re-created itself 4 times. I don't know if that is part of the problem or not

@artieparis, please upload both your macro file and image.
See How to upload your macro. Instructions for uploading to an existing post are just below the main instruction.

Here is my macro.

SpeedTest Macro (v9.2)

SpeedTest.kmmacros (5.4 KB)

I would try putting in a 2-second delay after each activation. That might be more reliable. Then, if this proves more reliable, you can decrease the delay progressively down to, say, 0.2s .

(I've found that activation can take some time and you're not allowing any. Just a thought.)

Thank you Martin. I will give that a try. I am shiny new to not only this program, but to creating macros in general. If I may ask two more questions. Firstly, if I create a macro, must I save it in some what to the program, and if so, how do I do that, and secondly, how can I leave Keyboard Maestro running in the background? It seems that I have to open the program and then minimise it by clicking the yellow button. If I click the red button, it closes the program. Kind regards.

Hey @artieparis,

A) What does the caution flag say on your first open file with the default app action? (Click on the yellow flag to see.)

B) What are you trying to accomplish with all the consecutive activations?
⠀⠀⠀- When run on my system they jam up SpeedTest for some reason.

You don't need the first open action when you have an activate action.

The Activate a Specific Application action launches the app if necessary.

Personally I'd do something like this:

(I'm not using a timed trigger in this demonstration macro.)

Open and Run SpeedTest v1.00.kmmacros (7.1 KB)

-Chris

1 Like

Create a macro group called Global Macros if it doesn't exist already.

Or Utilities – or something that makes sense to you.

Put the macro in there.

Macros are automatically saved.

See the Quick Start section of the user manual.

If you've installed Keyboard Maestro correctly the Keyboard Maestro Engine runs all the time.

The Keyboard Maestro Editor can be opened and closed at need.

Make sure this setting is ON in the Keyboard Maestro preferences:

image

Spend a little time with the user manual.

Make sure you investigate the Edit menu of the Keyboard Maestro Editor thoroughly.

See what happens when you hold down the Option key while in any of the Insert menus.

See what Insert Action by Name does. Note the help link in the dialog once you've done a search.

-Chris

1 Like

Hey @artieparis,

Make sure to take note of the Status Menu options in the prefs.

-Chris

Hi @ccstone,
Thank you for your replies. They are most appreciated. Sorry for the delay.

A) The caution flag on the first “open action” reads “Action Warning. Generally it is better to use an Activate Application action to launch or activate an application. If you must use this action, do not open it with the Default Application since that could be anything, instead open it with the Finder or another specific application.”

B) In the original macro that I created, I tried to add a “record action” at the end of the macro. I was not satisfied with the result, so I deleted the “record action” and created another, not satisfied with that one, deleted it and finally created another that I was happy with. At the time I did not realise that each time I created the “record action”, it automatically created the “Activate Speedtest” trigger. So the old ones created by the previous “record action” remained there. In the end, instead of having one “Activate Speedtest”, I ended up with 5.

You wrote that I didn’t need the first “open action” when I have an “activate action”. I tried deleting all the “open action” from the macro, and when it runs, it only opens the app, but does not activate the “Start” (or in this situation “Go”) button.

Thank you for the sample macro, but unfortunately it doesn’t work for me Maybe I missed something.

Thank you also for your second message. I did review the Quick Start but could not find anything about the program self-saving. When I asked about Keyboard Maestro running in the background, what I meant was that I want KM to run hidden automatically without having to press the “Command H” short-cut.

In the end, I have modified my “speedtest” macro and looks like it is working. Only time will tell. However, occasionally, it will open the “SpeedTest” app, but will not activate the start button (GO).

I compared my KM Preferences:General with your one and they are identical with the exception of the “Sync Macros” box which I have left unticked.

I certainly will take time to read and review the user manual.

I re-created the SpeedTest macro. It works pretty well for most of the day, however once and a while it will only open the app, but will not activate the Go button. I have attached a copy of the new macro that I have made.

Kind Regards
Artie

SpeedTest

SpeedTest.kmmacros (4.0 KB)

Are you running SpeedTest as a menu-bar app?

If so that would explain several things.

-Chris

Yes, I am. Excuse my ignorance, but why would that cause a problem and what would be the better alternative?

Artie

Hey Artie,

As far as I know SpeedTest does not default to being a menu bar app. In fact I didn't remember it could be set to be one.

So first and foremost it's good to be on the same page with other users when asking questions, because it saves confusion and everyone's time.

It explains why my macro doesn't work – because it depends upon the application becoming frontmost and upon the File › Begin Test menu item being available.

It also explains your first click action.

Menu bar apps can be problematic to activate and automate.

They can be moved, so clicking at a static position is not a great idea.

They can be moved temporarily by the system if for instance the location icon pops up (this happened to me while testing), so once again clicking at a static position is not a good idea.

On occasion I've seen menu bar icons have little dead spots that keep them from being clicked 100% of the time.

It can be difficult to ensure a click has done its job before moving on to the next step.

Keyboard Maestro simulates clicks, and this does not always work as expected. (Usually, but not always.)

Automating a regular application generally gives you more options and can be made more robust.

My previously posted macro should be very robust.

If for some reason I had to use the menulet app, I'd do this:

SpeedTest Macro – Menulet Version 1.00.kmmacros (53 KB)

Note – you'll have to retake the images in for the two actions that require them.

If you're on Catalina or Big Sur and have any weird transparency effects they might not work correctly.

I'm still using Sierra, so I can't test this.

-Chris