hail
February 21, 2026, 5:28pm
1
I have multiple screens, 4 total. Every time I take a screen shot, using the Apple shortcut Shift+Command+3, normally Mac OS will take four pictures , one for each screen.
Is there an easy way by BTT to take a screen shot of just the screen under the mouse cursor? Same as Mac OS, but just the active screen.
Thanks
You can use BTT's "Run Real JavaScript" action with this code, it will save to your desktop - you can change the path by changing it in the script:
async function captureMouseScreen() {
let mouseScreenX = await get_number_variable("mouse_screen_x");
let mouseScreenY = await get_number_variable("mouse_screen_y");
let mouseScreenWidth = await get_number_variable("mouse_screen_width");
let mouseScreenHeight = await get_number_variable("mouse_screen_height");
let result = await trigger_action({json: {
BTTPredefinedActionType: 169,
BTTPredefinedActionName: 'Capture Screenshot (Configurable)',
BTTScreenshotOptions: `-R;;${mouseScreenX},${mouseScreenY},${mouseScreenWidth},${mouseScreenHeight};;-t;;png;;~\/Downloads\/Screenshot_{datetime}_{random}.png;;`,
BTTScreenshotDateFormat: 'yyyy-MM-dd HH.mm.ss',
}, wait_for_reply: true});
return result;
}
hail
February 21, 2026, 9:59pm
3
This didn’t work, nothing happens. Is there anything I need to do in addition to pasting this code?