Not sure why my script isn't working any ideas?
Any help is appreciated.
tell application "System Events"
tell process "Finder"
set fileMenu to menu "File" of menu bar 1
if (enabled of menu item "Move to Bin" of fileMenu) then
set btnColor to "255, 79, 75, 255" as string
set btnIcon to "trash.fill" as string
else if (enabled of menu item "Eject" of fileMenu) then
set btnColor to "255, 79, 75, 255" as string
set btnIcon to "eject.fill" as string
else
set btnColor to "30, 30, 30, 25" as string
set btnIcon to "trash.slash" as string
end if
end tell
end tell
set btnJson to "{\"BTTTriggerConfig\" : {\"BTTTouchBarItemIconType\" : 2, \"BTTTouchBarItemIconHeight\" : 22, \"BTTTouchBarItemSFSymbolAlternateIcon\" : \"" & btnIcon & "\", \"BTTTouchBarItemSFSymbolDefaultIcon\" : \"" & btnIcon & "\", \"BTTTouchBarButtonColor\" : \"" & btnColor & "\"}}"
tell application "BetterTouchTool"
update_trigger "BC96F282-CAD1-4CFA-B750-C3CAB36CA1D2" json btnJson
return btnJson
end tell
The button color is being correctly updated but the SF symbols icon is not being applied? I've tried specifying the icon type and icon size in the script but all to no avail?