there are a number of C headers & libs I've seen floating around that will simplify writing to jpg (or jpeg) format. As for the screenshots, uh......why dont you try to uh.....hmmm.......find the printscreen ascii's value; trigger the printscreen button; take from whereever the button puts the screen in memory and write it out to a file (ordered by # like you said)? I don't know if this is feasable, but if you look into it, I'm sure you'll find plenty of useless information that is actually quite intresting
. I'd be suprised to find a script that wrote jpeg (or jpg) format (except Perl, that wouldn't suprise me).