MiniCap is a minimal screenshot capture app, with great commandline support, including the ability to launch (and then terminate) apps, capture windows by pid, handle, program name. It is a freeware screen capture application.
Here are some screenshots to illustrate the features and user interface of this application: