Select Menu Item Failed to Find Target Menu Item View➤Displays

I'm trying to create a macro to open the Display settings in the System Preferences. It first has an action that activates System Preferences and then is followed by another (Interface Control) action that selects the menu item 'View' in the system preferences menu.

I say "I'm trying" when in reality I did create such a macro and used it successfully before. Now, however, I get the error:

"Select Menu Item failed to find target menu item View➤Displays."

Why should that happen?

Hey Josep,

Impossible to say without examining your macro.

Please post the minimum possible test-macro that demonstrates your problem.

-Chris

Sorry, here's the macro:


Download: MacBook with LG SMALL TEST.kmmacros (2.7 KB)
Keyboard Maestro Export

This works for me on macOS Mojave, although time-based pauses are not the most reliable method of managing timing issues.

Try this instead:


Download: MacBook with LG SMALL TEST.ccs v1.00.kmmacros (3.8 KB)

Macro-Image

Keyboard Maestro Export

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2

Does this work?

MacBook with LG SMALL F.kmmacros (4.0 KB)

Not if System Preferences is not already running...

The View menu is not pre-populated and takes a bit of time to get its sh** together.

Did you try the macro I posted?

No, because my macro works (here), even if Sys Pref is already running ... but mainly because I don't need it. :wink:

But your macro is much better of course!

Thanks ccstone! And sorry for taking so long to answer. I had not seen the message notifying there was an answer.

It works perfectly. As far as I can see you simply changed the time-based pause for a 'Pause until conditions are met'. I don't understand why the time-based pause does not work in this case. It had always worked for me before. Although, I have to say, the 'pause until conditions are met' makes a lot more sense. I just had not noticed it was there :frowning:

Who knows what the exact problem is...

That's why timed pauses are insufficiently reliable in a workflow when other methods are available.

I never want to wait on a macro longer than necessary, so I don't want to use a 5+ second pause to make some action relatively bombproof – not when I can use a conditional pause and be certain the workflow is bombproof.

1 Like

And now that I know about the conditional pause, neither do I. Thanks for your help!

1 Like