Hi Andreas,
In the action “Resize Active Window To Specific Position & Size”, there is a very useful feature: Clicking the “Select Template Window” button opens a red, interactive window that can be freely moved and resized. Pressing the spacebar then automatically captures the current coordinates and window size.
It would be great to have a standalone action that allows triggering this Template Window independently—e.g., via a shortcut. The red Template Window could appear, and when pressing the spacebar, the captured coordinates and dimensions would be copied to the clipboard. This would make it easy to use these values in other workflows or for precise pixel measurements without modifying an active window.
This feature could be very useful for quickly determining dimensions and reusing values for other purposes. Would it be technically possible to add such an action to BetterTouchTool?
Thanks a lot, and best regards!
good idea, I'll add that soon.
In 5.207 alpha I have added a very basic version of this "Measure Area On Screen". It saves the result into these variables:
BTTActionMeasuredX, BTTActionMeasuredY, BTTActionMeasuredWidth, BTTActionMeasuredHeight
For writing them to the clipboard you'd currently need to run a little script "Run Real java Script"
//if you rename this, make sure to also rename it in the "function to call" field below.
async function copyDimensions() {
let x = await get_number_variable("BTTActionMeasuredX");
let y = await get_number_variable("BTTActionMeasuredY");
let width = await get_number_variable("BTTActionMeasuredWidth");
let height = await get_number_variable("BTTActionMeasuredHeight");
// format in any way you want
let clipboardString = `x: ${x}px, y: ${y}px, width: ${width}px, height: ${height}px`;
await set_clipboard_content({content: clipboardString, format: 'NSPasteboardTypeString'})
return clipboardString;
}
//edit: accidental minimum window size has been removed in 5.208 alpha
1 Like
Perfect, I love it! Thanks
Guten Tag
When I press the spacebar to measure the screen, a system beep sounds. You can hear it in the video. It seems that the beep is caused by the “Run Real JavaScript” action because when I disable this action, the beep does not happen. Is it possible to prevent the beep?
The second problem is with the clipboard. The measurement result is successfully copied to the clipboard, but CleanClipdoes not show it in the list. In other actions like “OCR… (Copy Result To Clipboard)”, the entry appears correctly in CleanClip. I wonder if there is a difference in how BTT saves clipboard entries that causes this issue?