Type something to search...

OverRec CLI Reference

OverRec includes a headless CLI mode for scripting and automation.

OverRec.exe cli <command> [options]

monitors — List displays

OverRec.exe cli monitors [--all]

Without --all, prints a compact ID/resolution list. With --all, prints full details: resolution, absolute position, scale factor, refresh rate, rotation, and primary flag.

Example output (--all):

ID    Resolution      Abs Position      Scale   Hz        Rot    Primary
0     1920x1080       (0, 0)            1       60        0°     yes
1     2560x1440       (1920, 0)         1       144       0°

window — Find a window by title keyword

OverRec.exe cli window [--all] [<keyword...>]

Lists all visible windows whose title contains all given keywords (case-insensitive). The printed WindowID is used with the snap command.

Without --all, prints a compact ID/title list. With --all, also shows the monitor number, location, and size. Location shows max or min instead of coordinates for maximised/minimised windows.

Examples:

OverRec.exe cli window chrome
OverRec.exe cli window visual studio
OverRec.exe cli window --all note

Example output (default):

WindowID        Title
------------------------------------------------------------
657846          Google Chrome
329812          Visual Studio Code

Example output (--all):

WindowID        Mon   Location          Size          Title
--------------------------------------------------------------------------------
657846          0     0,0               1920x1080     Google Chrome
329812          0     max               1920x1080     Visual Studio Code
131070          1     1920,0            1280x720      Notepad

Tip: run OverRec.exe cli window with no keywords to list every visible window.


snap — Move and resize a window

OverRec.exe cli snap --windowid ID --location X,Y --size WxH [--monitor ID]

Moves and resizes the window identified by --windowid to the given position and size. DWM shadow margins are corrected automatically so the visible frame lands exactly at the requested coordinates.

OptionDescription
--windowid IDWindow handle from OverRec.exe cli window
--location X,YTop-left corner in pixels
--size WxHWidth × Height in pixels
--monitor IDOptional. Offsets --location relative to that monitor’s top-left origin

Examples:

# Snap to absolute screen coordinates
OverRec.exe cli snap --windowid 657846 --location 0,0 --size 1920x1080

# Snap to the top-left quarter of monitor 1
OverRec.exe cli snap --windowid 657846 --location 0,0 --size 1280x720 --monitor 1

draw — Display an overlay rectangle

OverRec.exe cli draw --location X,Y --size WxH [--color COLOR] [--timeout SECS] [--monitor ID]

Opens a fullscreen transparent overlay and draws a rectangle. Stays visible until the window is closed or the timeout elapses.

OptionDescription
--location X,YTop-left corner relative to the monitor
--size WxHWidth × Height in pixels
--color COLORBorder color: red, green, blue, yellow, white, black, or #RRGGBB (default: blue)
--timeout SECSAuto-close after N seconds
--monitor IDMonitor to draw on (default: 0)

Examples:

OverRec.exe cli draw --location 100,100 --size 800x600
OverRec.exe cli draw --location 0,0 --size 1920x1080 --color "#FF4400" --timeout 3
OverRec.exe cli draw --location 200,200 --size 400x300 --monitor 1

screenshot — Capture a region to file or clipboard

OverRec.exe cli screenshot --location X,Y --size WxH [--output path.png] [--no-clipboard] [--monitor ID]

Captures the specified screen region. By default the image is copied to the clipboard; use --output to save to a file instead (or in addition).

OptionDescription
--location X,YTop-left corner relative to the monitor
--size WxHWidth × Height in pixels
--output path.pngSave to file (must end in .png)
--no-clipboardSkip copying to clipboard
--monitor IDMonitor to capture from (default: 0)

Examples:

# Copy to clipboard
OverRec.exe cli screenshot --location 0,0 --size 1920x1080

# Save to file only
OverRec.exe cli screenshot --location 100,200 --size 800x600 --output capture.png --no-clipboard

# Save and copy
OverRec.exe cli screenshot --location 0,0 --size 1280x720 --output shot.png

Typical workflow

# 1. Find your monitors
OverRec.exe cli monitors --all

# 2. Find the window you want to snap
OverRec.exe cli window chrome

# 3. Snap it to the left half of monitor 0
OverRec.exe cli snap --windowid 657846 --location 0,0 --size 960x1080

# 4. Optionally draw a reference rectangle to verify the area
OverRec.exe cli draw --location 0,0 --size 960x1080 --timeout 2

# 5. Take a screenshot of that area
OverRec.exe cli screenshot --location 0,0 --size 960x1080 --output left-half.png