Hi everyone,
I have a working Menu Bar Item that displays the case battery percentage of my AirPods Pro 3 in real time using a Shell Script + JSON output. That part works perfectly.
What I’m trying to achieve now: When I click on that icon in the menu bar, I want a small Custom Context Menu to appear just below it that shows:
Left: XX%
Right: XX%
I created a Run Apple Script (blocking) action that correctly sets two BTT string variables:
airpodsLeft
airpodsRight
When I click Run Script in the editor, it returns the correct values (
Left: 80% | Right: 80%).
However, when I actually click the menu bar icon, the context menu either:
- shows the literal text {airpodsLeft}% {airpodsRight}% instead of the real numbers, or
- shows nothing at all.
Here are my current settings (see the three screenshots attached):
- The main Menu Bar Item configuration (Run Apple Script + Context Menu Item)
- The AppleScript that sets the variables (works when tested)
- The overall trigger setup (“Show Custom Context Menu (NEW)”)
I’ve tried:
- Putting the script on the “Show Custom Context Menu” trigger itself
- Putting the script as the first action before “Show Custom Context Menu”
- Using {airpodsLeft}% in the Item Name field
Nothing makes the variables actually resolve in the popup menu.
Could someone explain the correct order / setup so that the AppleScript runs before the context menu is displayed and the variables are replaced with the real battery percentages?
Thanks a lot in advance ![]()



