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. And a nice interactive mode including scrolling capture. Tons of options for saving files in different formats with automatic naming and versioning.