There are two issues when running JavaScript to trigger the action:
Restore Window Layout does not work.
Ask For Input, Save To Variable causes a crash or a restart.
The Video
00:00~00:20 "Show HUD Overlay"
00:20~00:54 "Restore Window Layout"
00:54~ "Ask For Input, Save To Variable"
- Type of Mac: Macbook M1
- macOS version: 15.3.1
- BetterTouchTool version: 5.199
Crash Log
btt.crash2.crash (38.3 KB)
could you post the JS you are using?
As shown in the video, I just used the BTT-provided action script, but encountered an error during execution.
async function someJavaScriptFunction () {
//you can use the following with BTT's "Run Real Java Script" action
let result = undefined;
result = await trigger_action({
json: JSON.stringify({
BTTActionCategory: 0,
BTTIsPureAction: 1,
BTTPredefinedActionType: 403,
BTTPredefinedActionName: 'Ask For Input (Save To Variable)',
BTTAdditionalActionData: '{\"BTTActionAskForInputVariableName\":\"123\",\"BTTActionAskForInputPrompt\":\"ttt\"}',
BTTEnabled2: 1,
}), wait_for_reply: true
});
}
Should be fixed in 5.201 alpha!
1 Like
It works fine now, thank you!