BTT Predefined Actions list for Applescript

I was looking for a list of predefined actions, but I couldn't find anything. So I have been testing codes from 0 to 500, and I have done my own list of predefined actions.
The list are 100 simple applescripts, everyone with a different code and a short explanation. You can test them easily.

BTT Predefined Actions.zip (385.4 KB)

Oh that must have been a lot of work :slight_smile:
This is the list of actions, but often they require more parameters than just the number:

    BTTPredefinedActionNOAction=-1,
    BTTPredefinedActionAppleDefault=0,
    BTTPredefinedActionMiddleClick=1,
    BTTPredefinedActionCMDClick=2,
    BTTPredefinedActionLeftClick=3,
    BTTPredefinedActionRightClick=4,
    BTTPredefinedActionExpose=5,
    BTTPredefinedActionAppExpose=6,
    BTTPredefinedActionSpaces=7,
    BTTPredefinedActionDashboard=8,
    BTTPredefinedActionLoginScreen=9,
    BTTPredefinedActionFinder=10,
    BTTPredefinedActionZoomIn=11,
    BTTPredefinedActionZoomOut=12,
    BTTPredefinedActionSleepDisplay=13,
    BTTPredefinedActionSleepComputer=14,
    BTTPredefinedActionLogout=15,
    BTTPredefinedActionHiddenFiles=16,
    BTTPredefinedActionMoveWindowLeft=17,
    BTTPredefinedActionMoveWindowRight=18,
    BTTPredefinedActionMaxWindowLeft=19,
    BTTPredefinedActionMaxWindowRight=20,
    BTTPredefinedActionMaxWindow=21,
    BTTPredefinedActionMute=22,
    BTTPredefinedActionPlay=23,
    BTTPredefinedActionVolumeUp=24,
    BTTPredefinedActionVolumeDown=25,
    BTTPredefinedActionBackwards=26,
    BTTPredefinedActionForward=27,
    BTTPredefinedActionBrightnessUp=28,
    BTTPredefinedActionBrightnessDown=29,
    BTTPredefinedActionEject=30,
    BTTPredefinedActionIlluminationUp=31,
    BTTPredefinedActionIlluminationDown=32,
    BTTPredefinedActionF1=33,
    BTTPredefinedActionF2=34,
    BTTPredefinedActionF3=35,
    BTTPredefinedActionF4=36,
    BTTPredefinedActionF5=37,
    BTTPredefinedActionF6=38,
    BTTPredefinedActionF7=39,
    BTTPredefinedActionF8=40,
    BTTPredefinedActionF9=41,
    BTTPredefinedActionF10=42,
    BTTPredefinedActionF11=43,
    BTTPredefinedActionF12=44,
    BTTPredefinedActionDesktop=45,
    BTTPredefinedActionAppSwitcher=46,
    BTTPredefinedActionNextMonitor=47,
    BTTPredefinedActionMaxNextMonitor=48,
    BTTPredefinedActionLaunchApp=49,
    BTTPredefinedActionHideAllWindows=50,
    BTTPredefinedActionPageForward=51,
    BTTPredefinedActionPageBackward=52,
    BTTPredefinedActionHideAllButActive=53,
    BTTPredefinedActionDoubleClick=54,
    BTTPredefinedActionRestartBTT=55,
    BTTPredefinedActionQuitBTT=56,
    BTTPredefinedActionOpenBTTPreferences=57,
    BTTPredefinedActionOneFingerSearch=58,
    BTTPredefinedActionOpenURL = 59,
    BTTPredefinedActionPageUp=60,
    BTTPredefinedActionPageDown=61,
    BTTPredefinedActionHome=62,
    BTTPredefinedActionEnd=63,
    BTTPredefinedActionForwardDelete=64,
    BTTPredefinedActionStartDrag=65,
    BTTPredefinedActionStopDrag=66,
    BTTPredefinedActionMoveTablet = 67,
    BTTPredefinedActionToggleMagicMouseTouchpadMode = 68,
    BTTPredefinedActionStartMovingWindows=69,
    BTTPredefinedActionStopMovingWindows=70,
    BTTPredefinedActionStartResizingWindows = 71,
    BTTPredefinedActionStopResizingWindows=72,
    BTTPredefinedActionToggleResizingWindows=73,
    BTTPredefinedActionToggleMovingWindows=74,
    BTTPredefinedActionBeginGesture=75,
    BTTPredefinedActionEndGesture=76,
    BTTPredefinedActionSwipeLeft=77,
    BTTPredefinedActionSwipeRight=78,
    BTTPredefinedActionSwipeUp=79,
    BTTPredefinedActionSwipeDown=80,
    BTTPredefinedActionRotateLeft=81,
    BTTPredefinedActionRotateRight=82,
    BTTPredefinedActionEndGestureImmediately=83,
    BTTPredefinedActionRestoreOldWindowSize=84,
    BTTPredefinedActionCreateNewFile=85,
    BTTPredefinedActionFreeMenubar=86,
    BTTPredefinedActionCtrlClick = 87,
    BTTPredefinedActionAltClick=88,
    BTTPredefinedActionShiftClick=89,
    BTTPredefinedActionResizeToTopLeftQuarter=90,
    BTTPredefinedActionResizeToBottomLeftQuarter=91,
    BTTPredefinedActionResizeToTopRightQuarter=92,
    BTTPredefinedActionResizeToBottomRightQuarter=93,
    BTTPredefinedActionShowColorPicker=94,
    BTTPredefinedActionMoveBottomHalf = 95,
    BTTPredefinedActionMoveTopHalf = 96,
    BTTPredefinedActionCenter = 97,
    BTTPredefinedActionCenterNext = 98,
    BTTPredefinedActionWindowSwitcher = 99,
    BTTPredefinedActionWindowSwitcherAllApps=100,
    BTTPredefinedActionToggleBTT=101,
    BTTPredefinedActionCloseWindowUnderCursor=102,
    BTTPredefinedActionExposeAndSort=103,
    BTTPredefinedActionTerminateBTTImmediately=104,
    BTTPredefinedActionShowBTTPreferences=105,
    BTTPredefinedActionMinimizeWindowUnderCursor=106,
    BTTPredefinedActionZoomWindowUnderCursor=107,
    BTTPredefinedActionResizeToLeftThird=108,
    BTTPredefinedActionResizeToMiddleThird=109,
    BTTPredefinedActionResizeToRightThird=110,
    BTTPredefinedActionCMDShiftClick=111,
    BTTPredefinedActionFullScreen=112,
    BTTPredefinedActionSwitchSpaceLeft=113,
    BTTPredefinedActionSwitchSpaceRight = 114,
    BTTPredefinedActionLaunchpad = 115,
    BTTPredefinedActionLookup = 116,
    BTTPredefinedActionSmartZoom = 117,
    BTTPredefinedActionPasteString=118,
    BTTPredefinedActionCustomClick=119,
    BTTPredefinedActionBrightnessUpOnExternal = 120,
    BTTPredefinedActionBrightnessDownOnExternal = 121,
    BTTPredefinedActionNotificationCenter = 122,
    BTTPredefinedActionToggleCursorSize = 123,
    BTTPredefinedActionTriggerMenuItem = 124,
    BTTPredefinedActionShowMenubarInContextMenu = 125,
    BTTPredefinedActionToggleMouseSpeed=126,
    BTTPredefinedActionAirplayMirroring=127,
    BTTPredefinedActionSendShortcutToSpecificApp=128,
    BTTPredefinedActionDelay = 129,
    BTTPredefinedActionF13=130,
    BTTPredefinedActionF14=131,
    BTTPredefinedActionF15=132,
    BTTPredefinedActionF16=133,
    BTTPredefinedActionF17=134,
    BTTPredefinedActionF18=135,
    BTTPredefinedActionPostDistributedNotification=136,
    BTTPredefinedActionTerminalCommand = 137,
    BTTPredefinedActionAutomatorWorkflow = 138,
    BTTPredefinedActionSwitchToPreset = 139,
    BTTPredefinedActionToggleMouseCursorHidden = 140,
    BTTPredefinedActionToggleLeap = 141,
    BTTPredefinedActionAppSwitcherBackward = 142,
    BTTPredefinedActionEnabledLeapMouseControl = 143,
    BTTPredefinedActionDisableGestureRecognition = 144,
    BTTPredefinedActionDockQuitApp = 145,
    BTTPredefinedActionDockMinimize = 146,
    BTTPredefinedActionDockApplicationExpose = 147,
    BTTPredefinedActionDockSendKeyboardShortcut = 148,
    BTTPredefinedActionCMDDoubleClick = 149,
    BTTPredefinedActionIfMouseHoversDockIconEnableIt = 150,
    BTTPredefinedActionMoveWindowToLeftSpace = 151,
    BTTPredefinedActionMoveWindowToRightSpace = 152,
    BTTPredefinedActionChangeMousePosition = 153,
    BTTPredefinedActionSaveCurrentMousePosition = 154,
    BTTPredefinedActionRestoreSavedMousePosition = 155,
    BTTPredefinedActionEmptyTrash = 156,
    BTTPredefinedActionOpenFinderSelectionWithApp = 157,
    BTTPredefinedActionLockScreen = 158,
    BTTPredefinedActionUnlockScreen = 159,
    BTTPredefinedActionStartRecordingMouseGesture=160,
    BTTPredefinedActionStopRecordingMouseGesture=161,
    BTTPredefinedActionTriggerContextMenuItem=162,
    BTTPredefinedActionElCapitanSplitScreenLeft=163,
    BTTPredefinedActionElCapitanSplitScreenRight=164,
    BTTPredefinedActionMissionControlAndShowDesktopPreview=165,
    BTTPredefinedActionToggleSiriRemoteTouchpadMode = 166,
    BTTPredefinedActionShowCharacterPalette = 167,
    BTTPredefinedActionTriggerSnapArea = 168,
    BTTPredefinedActionScreenshot = 169,
    BTTPredefinedActionScreenshotWindow = 170,
    BTTPredefinedActionScreenshotAndEdit = 171,
    BTTPredefinedActionRunAppleScriptString = 172,
    BTTPredefinedActionStartSiri= 173,
    BTTPredefinedActionResizeToLeftTwoThird= 174,
    BTTPredefinedActionResizeToRightTwoThird= 175,
    BTTPredefinedActionOpenSelectedFolderWithApp = 176,
    BTTPredefinedActionShowHideSpecificApp = 177,
    BTTPredefinedActionModShiftDown = 178,
    BTTPredefinedActionModShiftUp = 179,
    BTTPredefinedActionModFNDown = 180,
    BTTPredefinedActionModFNUp = 181,
    BTTPredefinedActionModCtrlDown = 182,
    BTTPredefinedActionModCtrlUp = 183,
    BTTPredefinedActionModOptDown = 184,
    BTTPredefinedActionModOptUp = 185,
    BTTPredefinedActionModCMDDown = 186,
    BTTPredefinedActionModCMDUp = 187,
    BTTPredefinedActionToggleTouchBar = 188,
    BTTPredefinedActionESC = 189,
    BTTPredefinedActionToggleShowGlobalTouchBar = 190,
    BTTPredefinedActionCloseCurrentTouchBarGrop = 191,
    BTTPredefinedActionTypeString = 193,
    BTTPredefinedActionToggleCapsLock = 194,
    BTTPredefinedActionRunAppleScriptInBackgroundString = 195,
    BTTPredefinedActionAddNewSpace = 196,
    BTTPredefinedActionToggleDarkMode = 197,
    BTTPredefinedActionVolumeUpLittle = 198,
    BTTPredefinedActionVolumeDownLittle = 199,
    BTTPredefinedActionToggleDoNotDisturb = 200,
    BTTPredefinedActionToggleNightShift = 201,
    BTTPredefinedActionStartScreenSaver = 202,
    BTTPredefinedActionShowClipboardManager = 203,
    BTTPredefinedActionBringWindowUnderCursorToFront = 204,
    BTTPredefinedActionOpenTouchBarGroupWithName = 205,
    BTTPredefinedActionShellTask = 206,
    BTTPredefinedActionSwitchToDesktop1=207,
    BTTPredefinedActionSwitchToDesktop2=208,
    BTTPredefinedActionSwitchToDesktop3=209,
    BTTPredefinedActionSwitchToDesktop4=210,
    BTTPredefinedActionSwitchToDesktop5=211,
    BTTPredefinedActionSwitchToDesktop6=212,
    BTTPredefinedActionSwitchToDesktop7=213,
    BTTPredefinedActionSwitchToDesktop8=214,
    BTTPredefinedActionSwitchToDesktop9=215,

    BTTPredefinedActionMoveWindowToDesktop1=216,
    BTTPredefinedActionMoveWindowToDesktop2=217,
    BTTPredefinedActionMoveWindowToDesktop3=218,
    BTTPredefinedActionMoveWindowToDesktop4=219,
    BTTPredefinedActionMoveWindowToDesktop5=220,
    BTTPredefinedActionMoveWindowToDesktop6=222,
    BTTPredefinedActionMoveWindowToDesktop7=223,
    BTTPredefinedActionMoveWindowToDesktop8=224,
    BTTPredefinedActionMoveWindowToDesktop9=225,
    
    BTTPredefinedActionSwitchToDesktop10=226,
    BTTPredefinedActionSwitchToDesktop11=227,
    BTTPredefinedActionSwitchToDesktop12=228,
    BTTPredefinedActionSwitchToDesktop13=229,
    BTTPredefinedActionSwitchToDesktop14=230,
    BTTPredefinedActionSwitchToDesktop15=231,
    BTTPredefinedActionSwitchToDesktop16=232,
    BTTPredefinedActionSwitchToDesktop17=233,
    BTTPredefinedActionSwitchToDesktop18=234,
    BTTPredefinedActionSwitchToDesktop19=235,

    BTTPredefinedActionMoveWindowToDesktop10=236,
    BTTPredefinedActionMoveWindowToDesktop11=237,
    BTTPredefinedActionMoveWindowToDesktop12=238,
    BTTPredefinedActionMoveWindowToDesktop13=239,
    BTTPredefinedActionMoveWindowToDesktop14=240,
    BTTPredefinedActionMoveWindowToDesktop15=241,
    BTTPredefinedActionMoveWindowToDesktop16=242,
    BTTPredefinedActionMoveWindowToDesktop17=243,
    BTTPredefinedActionMoveWindowToDesktop18=244,
    BTTPredefinedActionMoveWindowToDesktop19=245,
    BTTPredefinedActionTerminalCommandBlocking = 246,
    BTTPredefinedActionQuitAppUnderCursor=247,
    
    BTTPredefinedActionTriggerNamedTrigger=248,
    BTTPredefinedActionShowFloatingWebView=249,
    BTTPredefinedActionCustomPaste=250,
    BTTPredefinedActionCustomMoveResize=251,
    BTTPredefinedActionRunJavaScriptInBackgroundString = 252,
    BTTPredefinedActionRunJavaScriptOnMainThreadString = 253,
    BTTPredefinedActionShowHUD = 254,
    BTTPredefinedActionHapticFeedback = 255,
    BTTPredefinedActionSaveSelectedTextToVariable = 256,
    BTTPredefinedActionToggleTrueTone = 257,
    BTTPredefinedActionTogglePreset = 258,
    BTTPredefinedActionBrightnessUpLittle = 259,
    BTTPredefinedActionBrightnessDownLittle = 260,
    BTTPredefinedActionBrightnessExternalUpLittle = 261,
    BTTPredefinedActionBrightnessExternalDownLittle = 262,
    BTTPredefinedActionTakeScreenshotOrVideo = 263,
    BTTPredefinedActionKeyboardShortcut = 264,
    BTTPredefinedActionHideMenubarExtras = 265,
    BTTPredefinedActionToggleMirroring = 266,
    BTTPredefinedActionMoveAllWindowsToMouseDisplay = 267,
    BTTPredefinedActionRestoreSavedWindowLayout = 268,
    BTTPredefinedActionSaveCurrentWindowLayout = 269,
    BTTPredefinedActionRestoreCurrentWindowLayout = 270,
    BTTPredefinedActionConnectMIDIDevice = 271,
    BTTPredefinedActionScroll = 272,
    BTTPredefinedActionShowCustomContextMenu = 273,
    BTTPredefinedActionConnectBluetoothDevice = 274,
    BTTPredefinedActionDisconnectBluetoothDevice = 275,
    BTTPredefinedActionToggleBluetoothDevice = 276,
    BTTPredefinedActionEnableBluetooth = 277,
    BTTPredefinedActionDisableBluetooth = 278,
    BTTPredefinedActionToggleBluetooth = 279,
    BTTPredefinedActionPlugin = 280,
    BTTPredefinedActionRunCoreJavaScript = 281

Usually if you want to trigger a BTT action just configure a example trigger in BTT, select it and press cmd+c. The json copied to your clipboard will show all the parameters - it will also contain the trigger configuration, but you can remove that.

5 Likes

wow!!

great list!!

thanks a lot

It took me some hours testing, but it was not so hard

1 Like

Regarding the action of Connect Midi Bluetooth device, is it possible to select the device via applescript?

Ah you found a bug :slight_smile:
I forgot to add the identifier for the midi device selection.

It can still be done like this for now but there was no way to figure that out:

trigger_action "{\"BTTPredefinedActionType\":271, \"BTTLaunchPath\":\"TheMidiDeviceName\"}" -

I'll fix it with the next version.

Perfect, thanks!!
The predefined action will work if I put an * for connecting the recently connected device?

Regarding the bug, I posted this issue in october here, with details:

It should work with * (this means it will just connect the first device it sees) however I have only tested on macOS 10.15.

Sorry for not replying in October, I was super busy back then :slight_smile:

Just tested again, there seems to be something off! I'll look into this tomorrow. I think it only connects to the first device and ignores the name.

Ok, thanks a lot.

I will test it also.

*No problem for not replying in October!!!!!!!! :smile:

Hi again

Regarding my experience using this feature, I think there are 2 bugs (or 2 things to improve) regarding midi device selection:

Bug 1: Any text in the device cell doesn't work
If writting * for connecting any device, or writting the name of a especific device, the same behaviour happens: the bluetooth midi window opens and closes inmediately and no device is connected.

Bug 2: Bluetooth Midi Window auto-hide and not auto-close
After opening the Bluetooth Midi Window, if you open another app or you click outside the bluetooth midi window, the bluetooth midi window disappears inmediately.
It's not visible anywhere (not visible in MIssion Control, not visible in Finder menu bar, etc.).
If you open again the bluetooth midi window, the window appear again.

If you move this new window, you will see that behind the window there is another window below. The window below is the window opened the first time.

Repeating these steps you can open several bluetooth midi windows, one over another.
Sometimes it has happened to me that the window below shows a device as connected, and at the same time the upper window shows the same device as not connected.

I suppose the right behaviour should be that the bluetooth midi window are visible until you close it clicking the X button, or with the same BTT action that has opened it.
I wonder if it's possible to close it clicking command+w as there is no menubar for the window.

Or maybe the correct behaviour should be to keep it like it is now, only changing that everytime the window disappear, the window must be closed instead of hidden.

Hope the explanation is clear enough!

There are some improvements that can be done to the bluetooth midi window. I will make now a new post in the new features request area.

Thanks.

Hi Andreas
Could you test this issue?
Thanks

hi again
did you check the bug?

Hi Andreas
Could you check this issue?
Could you read my post of March 3?
Thanks

Could you check whether this behaves better in BetterTouchTool 3.355 alpha?

Hi Andreas,
i tried to connect a Bluetooth midi device with "*" and the device name but the connection screen just comes up for half a second and closes, before the "connect" button even appears.

it needs to show the list quickly otherwise it can not connect, but if you enter * it will just try to connect to the first one

The problem seems that, it isn't open long enough for the connect button to appear. (needs like 1 to 2 seconds when opening the window in Midi-Studio)

hello -
Did we ever get anywhere with this action? Would love for it to work via Shortcuts, so when I start my notation app, it automatically connects my bluetooth Midi devices.

Cheers
kayle