Switching visibility only takes effect after a restart

tell application "BetterTouchTool"
	set json_string to "{\"BTTMenuItemVisibleWhileActive\": 0, \"BTTMenuItemVisibleWhileInactive\": 0}"
	update_menu_item menu_name "streamdeck" item_name "audio-out-int-speaker" json json_string with persist
end tell

This is the code I use to toggle visibility. I'm almost sure this is a bug. Or am I holding it wrong?

you are right, in my tests it doesn't require a restart but I need to hover the menu once. I think this is an issue that was introduced recently, I'll fix it.

1 Like

this should now work in 4.542 alpha!

1 Like

@Andreas_Hegenberg I'm not sure if I'm experiencing the same o related bug. Sorry to report without the alpha version installed but I'm using BTT through Setapp and afaik I can't only enable experimental versions for all apps and not for a single one. If there is another way please tell me how.

The bug: When configuring its position in "At the", the menu will disappear as soon as I select any of the two dynamic variable options or also mouse position. The only way I've found to make the menu visible again is to pick another option and restart BTT.

My goal is to position the menu where the "Wait For Image To Become Visible On Screen & Move Mouse" action is locating an image, using the image_location variable.

@Josse the setapp update should be available in 1-2h. For your use case I'd recommend to do it like this:


1 Like

Sorry for the late reply. Your recommendation is working for changing the menu's position relative to the image's position :slight_smile: Thanks!

I'm using an image to position the menu as an alternative to the text cursor, as BTT seems unable to get its position in Chrome and the mac app I'm trying to interact with could be Chrome based. For instance, If the text cursor is in the text box used to post comments here, and I trigger the "Move Mouse to Position" in Safari the mouse will move perfectly to the text cursor, in Chrome it doesn't. There is any workaround for this?

About the visibility issue, I still couldn't toggle the visibility of my menu with the BTT option or applescript. I finally tried to export my menu and a default menu, use a code editor to copy the properties of the default menu, paste them in mine and import it. This worked to recover it. I paste below the previous properties of my menu. I can't see anything that would prevent it to become visible but maybe you can:

      "BTTMenuBringToFrontOnHover" : 0,
      "BTTMenuOnlyUpdatePositionOnExplicitRequest" : 1,
      "BTTMenuVerticalSpacing" : 6,
      "BTTMenuMakeDefaultStyle" : null,
      "BTTMenuAnchorRelation" : 1,
      "BTTMenuItemBackgroundColor" : "249.000000, 250.000000, 251.000000, 255.000000",
      "BTTMenuCategoryItemVisibility" : 0,
      "BTTMenuPositioningType" : 1,
      "BTTMenuItemBorderWidth" : 1,
      "BTTMenuPositionRelativeTo" : 0,
      "BTTMenuCategoryOnlyShowIf" : 0,
      "BTTMenuCategoryModifiers" : 0,
      "BTTMenuOffsetX" : -5,
      "BTTMenuOffsetY" : -5,
      "BTTMenuItemShadowEnabled" : 0,
      "BTTMenuItemCornerRadius" : 6,
      "BTTMenuFrameWidth" : 290,
      "BTTMenuFrameHeight" : 400,
      "BTTMenuCategoryShadow" : 0,
      "BTTMenuItemBorderColor" : "199.000000, 209.000000, 221.000000, 255.000000",
      "BTTMenuCategoryBackground" : 0,
      "BTTMenuCategoryZIndex" : 0,
      "BTTMenuItemPaddingTop" : 10,
      "BTTMenuCategoryItemSpacing" : 0,
      "BTTMenuVisibility" : 1,
      "BTTMenuItemsUseModifierModes" : false,
      "BTTMenuCopyStyle" : null,
      "BTTMenuItemBlurredBackground" : 0,
      "BTTMenuLayoutDirection" : 0,
      "BTTMenuItemBackgroundType" : 4,
      "BTTMenuTitleBarStyle" : 0,
      "BTTMenuItemPaddingLeft" : 16,
      "BTTMenuItemBackgroundColorHover" : "249.000000, 250.000000, 251.000000, 255.000000",
      "BTTMenuHorizontalSpacing" : 6,
      "BTTMenuCategoryMenuVisibility" : 0,
      "BTTMenuWindowLevel" : 3,
      "BTTMenuCategoryBorder" : 0,
      "BTTMenuItemPaddingRight" : 16,
      "BTTMenuCloseAfterAction" : 0,
      "BTTMenuWindowResizable" : 1,
      "BTTMenuItemMinWidth" : 236,
      "BTTMenuAnchorMenu" : 1,
      "BTTMenuItemMaxWidth" : 2,
      "BTTMenuShowIfWindowLevelEqualsEnabled" : 0,
      "BTTMenuCategoryItemSizing" : 0,
      "BTTMenuAppearanceStyle" : 0,
      "BTTMenuItemBorderColorHover" : "199.000000, 209.000000, 221.000000, 255.000000",
      "BTTLastChangeUUID" : "1B3669EB-F965-4EEA-93CF-2A9FB879F5F3",
      "BTTMenuCategorySpacing" : 0,
      "BTTMenuItemSaveCurrentSize" : null,
      "BTTMenuCategoryPosition" : 0,
      "BTTMenuElementIdentifier" : "backlink_review_widget",
      "BTTMenuItemPaddingBottom" : 0,
      "BTTMenuAlwaysUseLightMode" : "1",
      "BTTMenuCategoryItemIcon" : 0,
      "BTTMenuOffsetYUnit" : 0,
      "BTTMenuCategorySize" : 0