Select a screen region by dragging a rectangle, then print and copy coordinates ready for screencapture or AppleScript. The tool shows a dimmed overlay on all displays; drag to create a selection, resize with handles, move by dragging inside the rect, and confirm with Return or the Confirm button. Esc or Cancel aborts without changing the clipboard.
brew tap ttscoff/thelab
brew install screencoordNo Xcode required — the formula installs a prebuilt universal macOS binary from GitHub Releases.
Requires Swift (Xcode or Command Line Tools):
swift build -c release
cp .build/release/screencoord /usr/local/bin/Tag a version to build and publish the Homebrew tarball via GitHub Actions:
git tag -a v0.1.0 -m "screencoord 0.1.0"
git push origin v0.1.0Then update sha256 (and version) in ttscoff/homebrew-thelab Formula/screencoord.rb to match the release asset checksum.
Default format is screencapture (x,y,w,h in screen points):
screencapture -R "$(screencoord)" output.pngAppleScript format (screen points):
screencoord --format applescriptShow help:
screencoord --helpOn success, the same coordinate string is written to stdout and copied to the clipboard. Cancel leaves the clipboard unchanged.
| Format | Coordinate space | Output example | Use with |
|---|---|---|---|
screencapture (default) |
Screen points, top-left origin at primary display | 100,200,800,600 |
screencapture -R |
applescript |
Screen points, top-left origin at primary display | {100, 200, 800, 600} |
AppleScript screen math |
Both formats describe the same rectangle in screen points; only the string shape differs. screencapture -R takes points, so a selection on a Retina display is not scaled by the backing factor.
| Code | Meaning |
|---|---|
0 |
Success — coordinates printed and copied |
1 |
Cancelled — no output, clipboard unchanged |
2 |
Invalid arguments or overlay failure |
screencoord only draws a coordinate-selection overlay; it does not capture screenshots or read screen contents. Screen Recording and Accessibility permissions are not required for this coordinates-only workflow.
- macOS 13 or later