Is there a way to check the status of a menubar item whether it's enabled or disabled? ChatGPT only gave me a script that returns true or false in the script result but I don't know how or where to save the returned value and use that for If condition action.
tell application "System Events"
tell process "Figma"
set menuItemEnabled to (enabled of menu item "Go to Main Component" of menu "Main Component" of menu item "Main Component" of menu "Object" of menu bar 1)
end tell
end tell
return menuItemEnabled
@Andreas_Hegenberg Hi, is there a better way to do this? I'm not sure I explained it very well. Determine if menubar item is disabled, then do this action. Otherwise, do this action. Stuff like that.
For example, in Figma, if I press a custom trigger — Opt+C and this menu item is disabled →
if you click the run button while BTT is frontmost, it will try to get the details from BTT‘s menubar. You can click the „run script“ button while pressing cmd, then BTT will stay in background