I am often on Zoom/Teams/WebEx calls and want to build an action that captures the presenter's slide, so I can paste in my notes. Because each of these are slightly different and sometimes the presenter's picture is to the side, the area for the slide is in a slightly different place every time.
I made an action, I'll call Action 1, that captures a custom areas of the screen, and pastes it into my notes program. I am trying to figure out how (or if it is possible) to create an Action 2, where I could select the area to capture one time and set some variable so that the Action 1 would always select that area. This seems like it would be easier than having to go in and edit the Action 1 every time.
In this preset, pressing cmd+opt+s let's you select an area of your screen.
Pressing cmd+opt+c will capture the last selected area and save it to your downloads folder.
async function saveDimensions() {
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 slideFrame = `${x},${y},${width},${height}`;
await set_string_variable({variableName: "SlideFrameToCapture", to: slideFrame})
return slideFrame;
}
You can resize/move the red measuring rectangle with your mouse, but it currently doesn't support dragging like when taking a screenshot. This is planned, but might take a while.
You could probably script something that captures two mouse locations and calculate the rectangle from them.