I’d like to get an image of a particular window on a screen or even a particular location on the screen. I’m trying to capture frames of animation and need to make many screenshots, and then glue them together. Hence, a script that does not require interaction from the user would be useful.
I have two promising routes, but neither of them really work yet.
/usr/sbin/screencapture: It seems straightforward to drive screencapture to capture the entire screen, but I can’t seem to find a way to have it capture a portion of the screen (or a particular window).
Grab.app: Again, driving Grab.app seems like it should work but when I try to drive it through the user interface using applescript, I need to get past the Grab.app window that says “When the window you want is ready, click Choose Window, then click the window to capture it.”
How does one do this part in Applescript?
If there are any suggestions, I would greatly appreciate any advice.
Thanks very much.