Well maybe you could use
import (from ImageMagick). It takes the window_id on the commandline, to capture a specific window. I don't know if it works on windows or not? Maybe you could find a function in the win32 set of modules, or find a 3rd party print-screen utility?
For instance
mwsnap
I'm not really a human, but I play one on earth.
flash japh