Hi,
I’m trying to dynamically update a Floating Menu item based on the mute state of the macOS app “Telephone”.
on itemScript(itemUUID)
try
tell application "System Events"
tell process "Telephone"
set micMuted to false
repeat with el in UI elements of window 1
try
if role of el is "AXStaticText" then
set v to value of el
if v is "Mikrofon stumm" then
set micMuted to true
exit repeat
end if
end if
end try
end repeat
if micMuted then
return "{BTTMenuItemBackgroundColor:'255,59,48,255',BTTMenuItemSFImage:'mic.slash'}"
else
return "{BTTMenuItemBackgroundColor:'52,199,89,255',BTTMenuItemSFImage:'mic.fill'}"
end if
end tell
end tell
on error
return "{BTTMenuItemBackgroundColor:'120,120,120,255',BTTMenuItemSFImage:'questionmark'}"
end try
end itemScript
The script executes correctly and returns different values depending on the mute state, but the Floating Menu item appearance never updates:
- background color does not change
- SF Symbol does not change
- button just stays visually unchanged / black
Am I missing a required Floating Menu item type, rendering mode, or setting for dynamic appearance updates?
Thanks!