// troubleshooting guide · hammerspoon

Hammerspoon selectMenuItem Not Working From Console

Status
Workaround available
platforms:
macOS
updated:
November 16, 2026
Method
how we research
Share

RUNBOOK · hammerspoon/menu-item-not-working1 FIX

// quick answer

Some apps disable menus when focus leaves their window, so menu actions fail from the Console. Run them from a hotkey instead.

Most likely fix: Bind the action to a hotkey

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Bind the action to a hotkey

    1. 01Put the code in init.lua inside a hs.hotkey.bind callback
    2. 02Focus the target app and press the hotkey
    Did this fix it?

Symptoms

findMenuItem or selectMenuItem returns nothing when typed in the Console.

Why it happens

  • C-01App menus disabled when window loses focus

// this guide also covers

  • hammerspoon selectMenuItem
  • hammerspoon findMenuItem not working

Still not working?

If Hammerspoon keeps failing, you're not alone. See every Hammerspoon problem users report or the alternatives people switch to.

Done fighting Hammerspoon? Our small team builds your own Hammerspoon alternative, or any software you need: web, mobile, games, desktop. Price agreed together.

Talk to us

Watch Hammerspoon Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

Other Hammerspoon errors