Thank you for your reply.
It works.
Maybe there is something wrong with my script, it can only run one of the results. "is enabled" action is not recognized. In order to make it clearer, I changed "Adobe Audition CC 2017" to "Notes", the program that comes with Apple
tell application "System Events"
tell application process "Notes"
if menu item "Cut" of menu "Edit" of menu bar item "Edit" of menu bar 1 is enabled then
tell application "BetterTouchTool"
trigger_named_async_without_response "draw_ink"
end tell
else
tell application "BetterTouchTool"
trigger_named_async_without_response "highlighter"
end tell
end if
end tell
end tell
[
{
"BTTAppBundleIdentifier" : "com.apple.Notes",
"BTTAppName" : "Notes",
"BTTAppAutoInvertIcon" : 1,
"BTTAppProcessMatchMode" : 2,
"BTTAppProcessName" : "Notes",
"BTTTriggers" : [
{
"BTTTriggerType" : 179,
"BTTTriggerTypeDescription" : "2 Finger Double-Tap",
"BTTTriggerClass" : "BTTTriggerTypeTouchpadAll",
"BTTPredefinedActionType" : 195,
"BTTPredefinedActionName" : "Run Apple Script (async in background)",
"BTTInlineAppleScript" : "tell application \"System Events\"\r\ttell application process \"Notes\"\r\t\tif menu item \"Cut\" of menu \"Edit\" of menu bar item \"Edit\" of menu bar 1 is enabled then\r\t\t\ttell application \"BetterTouchTool\"\r\t\t\t\ttrigger_named_async_without_response \"draw_ink\"\r\t\t\tend tell\r\t\telse\r\t\t\ttell application \"BetterTouchTool\"\r\t\t\t\ttrigger_named_async_without_response \"highlighter\"\r\t\t\tend tell\r\t\tend if\r\tend tell\rend tell",
"BTTEnabled2" : 1,
"BTTAlternateModifierKeys" : 0,
"BTTRepeatDelay" : 0,
"BTTUUID" : "0C551E2E-FECD-4748-8DE1-135ED3CC2C33",
"BTTNotesInsteadOfDescription" : 0,
"BTTEnabled" : 1,
"BTTModifierMode" : 0,
"BTTOrder" : 0,
"BTTDisplayOrder" : 0
},
{
"BTTTriggerType" : 643,
"BTTTriggerTypeDescription" : "Named Trigger: highlighter",
"BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
"BTTPredefinedActionType" : -1,
"BTTPredefinedActionName" : "No Action",
"BTTLayoutIndependentActionChar" : "LEFT",
"BTTAutoAdaptActionToKeyboardLayout" : true,
"BTTShortcutToSend" : "58,123",
"BTTTriggerName" : "highlighter",
"BTTEnabled2" : 1,
"BTTAlternateModifierKeys" : 0,
"BTTRepeatDelay" : 0,
"BTTUUID" : "9886CF84-B6E1-4699-A745-8DCA11A68B59",
"BTTNotesInsteadOfDescription" : 0,
"BTTEnabled" : 1,
"BTTModifierMode" : 0,
"BTTOrder" : 2,
"BTTDisplayOrder" : 0
},
{
"BTTTriggerType" : 643,
"BTTTriggerTypeDescription" : "Named Trigger: draw_ink",
"BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
"BTTPredefinedActionType" : -1,
"BTTPredefinedActionName" : "No Action",
"BTTLayoutIndependentActionChar" : "DELETE",
"BTTAutoAdaptActionToKeyboardLayout" : true,
"BTTShortcutToSend" : "51",
"BTTTriggerName" : "draw_ink",
"BTTEnabled2" : 1,
"BTTAlternateModifierKeys" : 0,
"BTTRepeatDelay" : 0,
"BTTUUID" : "E97F0987-E53B-441B-98DF-1E34EE222810",
"BTTNotesInsteadOfDescription" : 0,
"BTTEnabled" : 1,
"BTTModifierMode" : 0,
"BTTOrder" : 1,
"BTTDisplayOrder" : 0
}
]
}
]