# Standalone “Template Window” Action for Measuring & Copying Dimensions

**URL:** <https://community.folivora.ai/t/standalone-template-window-action-for-measuring-copying-dimensions/42240>\
**Category:** Feature Requests\
**Created:** [February 11, 2025, 10:02am UTC](https://community.folivora.ai/t/standalone-template-window-action-for-measuring-copying-dimensions/42240 "2025-02-11T10:02:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CLUB777ONE](https://community.folivora.ai/user_avatar/community.folivora.ai/club777one/32/41653_2.png) [@CLUB777ONE](https://community.folivora.ai/u/CLUB777ONE)\
**Post date:** [February 11, 2025, 10:02am UTC](https://community.folivora.ai/t/standalone-template-window-action-for-measuring-copying-dimensions/42240/1 "2025-02-11T10:02:54Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [February 11, 2025, 10:13am UTC](https://community.folivora.ai/t/standalone-template-window-action-for-measuring-copying-dimensions/42240/2 "2025-02-11T10:13:06Z")

</div>

good idea, I'll add that soon.

---

<div class="post-metadata">

**Author:** ![CLUB777ONE](https://community.folivora.ai/user_avatar/community.folivora.ai/club777one/32/41653_2.png) [@CLUB777ONE](https://community.folivora.ai/u/CLUB777ONE)\
**Post date:** [February 11, 2025, 10:34am UTC](https://community.folivora.ai/t/standalone-template-window-action-for-measuring-copying-dimensions/42240/3 "2025-02-11T10:34:03Z")

</div>

Wunderbar, Dankeschön!!!

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [February 20, 2025, 1:04pm UTC](https://community.folivora.ai/t/standalone-template-window-action-for-measuring-copying-dimensions/42240/4 "2025-02-20T13:04:32Z")

</div>

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

 ![image](https://community.folivora.ai/uploads/default/original/3X/0/5/053ae61cbdb3f84cce9f15fed2af0911a9efa771.jpeg)

 ![image](https://community.folivora.ai/uploads/default/original/3X/a/0/a0a510cda314c5f23505330eb429d3449aab458e.png)

For writing them to the clipboard you'd currently need to run a little script "Run Real java Script"

```auto
//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

---

<div class="post-metadata">

**Author:** ![CLUB777ONE](https://community.folivora.ai/user_avatar/community.folivora.ai/club777one/32/41653_2.png) [@CLUB777ONE](https://community.folivora.ai/u/CLUB777ONE)\
**Post date:** [February 20, 2025, 5:38pm UTC](https://community.folivora.ai/t/standalone-template-window-action-for-measuring-copying-dimensions/42240/5 "2025-02-20T17:38:29Z")

</div>

Perfect, I love it! Thanks

---

<div class="post-metadata">

**Author:** ![CLUB777ONE](https://community.folivora.ai/user_avatar/community.folivora.ai/club777one/32/41653_2.png) [@CLUB777ONE](https://community.folivora.ai/u/CLUB777ONE)\
**Post date:** [February 23, 2025, 3:12pm UTC](https://community.folivora.ai/t/standalone-template-window-action-for-measuring-copying-dimensions/42240/6 "2025-02-23T15:12:37Z")

</div>

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 **CleanClip** does 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?

 ![Bildschirmfoto 2025-02-23 um 15.45.43](https://community.folivora.ai/uploads/default/original/3X/f/7/f72ba4af353e172301a091c63168a0676211b5a1.jpeg)

 ![Bildschirmfoto 2025-02-23 um 15.49.13](https://community.folivora.ai/uploads/default/original/3X/8/7/87cc3263f1d7869e6d9fa521da9e5864478ac9cf.png)
