Bugs with alternate color/text when using AppleScript Menu Bar; BTT UI menu bug

Describe the bug:

When using an AppleScript Menubar Icon trigger with no text, I've encountered a few issues:

  1. Sometimes the result of the script is printed even if configured to "Show only icon, no text".
  2. When the alternate background color is on, the icon does not appear at all.
  3. The script is configured to run regularly but sometimes does not until I click somewhere (though maybe that's a macOS limitation)
  4. When I create a new preset, it does not show up in the Presets menu in the BTT UI (see first screenshot of menu, where the following screenshot shows that I've created the new preset). If I close and reopen the UI, the menu then updates.

Affected input device:

macOS Menu Bar

Screenshots

BTT menu options bug (issue #4):

Screen Shot 2021-01-29 at 10.58.23

Screen Shot 2021-01-29 at 10.58.32

Issue #2 (background color/no icon):

Screen Shot 2021-01-29 at 11.11.01

Screen Shot 2021-01-29 at 11.12.39

Device information:

  • Type of Mac: MacBook Pro (16", 2019)
  • macOS version: 11.1 (Big Sur)
  • BetterTouchTool version: 3.553 (1693)

Additional information:

My current workaround for issue #1 is to have the script return 1 zero-width space character for the default color and 2 zero-width spaces for the alternate color.

This is my configuration:

{
  "BTTPresetCreatorNotes" : "",
  "BTTPresetInfoURL" : "",
  "BTTPresetName" : "ZoomMute",
  "BTTPresetColor" : "31.237500, 34.361250, 124.950000, 255.000000",
  "BTTPresetUUID" : "82E24B4F-D222-420E-915F-BE4B95C5B9CC",
  "BTTPresetContent" : [
    {
      "BTTAppBundleIdentifier" : "com.apple.finder",
      "BTTAppName" : "Finder",
      "BTTAppAutoInvertIcon" : 1,
      "BTTTriggers" : [

      ]
    },
    {
      "BTTAppBundleIdentifier" : "BT.G",
      "BTTAppName" : "Global",
      "BTTAppAutoInvertIcon" : 1,
      "BTTTriggers" : [
        {
          "BTTGestureNotes" : "ZoomMute",
          "BTTTriggerType" : 680,
          "BTTTriggerTypeDescription" : "Menubar Item: ZoomMute",
          "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
          "BTTPredefinedActionType" : -1,
          "BTTPredefinedActionName" : "No Action",
          "BTTLayoutIndependentActionChar" : "a",
          "BTTAutoAdaptActionToKeyboardLayout" : true,
          "BTTShortcutToSend" : "56,55,0",
          "BTTEnabled2" : 1,
          "BTTRepeatDelay" : 0,
          "BTTUUID" : "0207E545-A9B3-4FE6-928C-00141A33C171",
          "BTTNotesInsteadOfDescription" : 0,
          "BTTEnabled" : 1,
          "BTTModifierMode" : 0,
          "BTTOrder" : 0,
          "BTTDisplayOrder" : 0,
          "BTTIconData" : "[...]",
          "BTTTriggerConfig" : {
            "BTTScriptType" : 0,
            "BTTTouchBarButtonLineHeight" : 0,
            "BTTTouchBarItemIconWidth" : 22,
            "BTTTouchBarButtonTextAlignment" : 0,
            "BTTTouchBarColorRegex" : "​​",
            "BTTTouchBarButtonTopMargin" : 0,
            "BTTTouchBarButtonColor" : "0.000000, 0.000000, 0.000000, 0.000000",
            "BTTTouchBarScriptUpdateInterval" : 2,
            "BTTTouchBarAlternateBackgroundColor" : "255.000000, 45.000001, 33.000002, 255.000000",
            "BTTTouchBarAppleScriptString" : "on is_zoom_open()\r\ttell application \"System Events\" to (name of processes) contains \"zoom.us\"\rend is_zoom_open\r\ron is_mic_on()\r\tif not is_zoom_open() then\r\t\treturn \"​\"\r\tend if\r\t\r\ttell application \"System Events\"\r\t\ttell application process \"zoom.us\"\r\t\t\tif exists (menu item \"Mute audio\" of menu 1 of menu bar item \"Meeting\" of menu bar 1) then\r\t\t\t\treturn \"​​\"\r\t\t\tend if\r\t\tend tell\r\tend tell\r\t\r\treturn \"​\"\rend is_mic_on\r\ris_mic_on()",
            "BTTTouchBarAppleScriptStringRunOnInit" : false,
            "BTTTouchBarButtonFontSize" : 15,
            "BTTTouchBarAppleScriptUsePath" : 0,
            "BTTTouchBarOnlyShowIcon" : 1,
            "BTTTouchBarItemIconHeight" : 22,
            "BTTTouchBarButtonBaselineOffset" : 0
          }
        }
      ]
    }
  ],
  "BTTPresetSnapAreas" : [

  ]
}

Hey I think I might be affected, too.

I have a text-only widget with a regexp-triggered alternative color. The alternative color never shows up.