April 18th, 2005, 03:40 PM
using python to make screenshots?
any ideas on using python to generate window screenshots? (win32) I'm tired of print screening and then cutting out the active window. Perhaps some COM coding?
Any suggestions in advance are highly appreciated.
April 18th, 2005, 04:42 PM
I suggest you press alt-printscreen.
Comments on this post
April 19th, 2005, 03:47 PM
haha... yes i know about that one... ok i really should have been more specific of course...sorry about that.
I want to _automatically_ generate screenshots (images of the page) based upon defined links and passages of text on a website that should exist (which I'm checking for). The basic idea is that if the next page on my hitlist lacks a certain link it will collect a screenshot of the page for me.
This is going to (eventually) generate a ppt file using COM from a python server I suppose, since this will be really useful at work.
I'll play around with PIL but can it capture? Or rather, does win32com/win32gui have the API that does the ctrl/alt printscreen for me? Or should I just find a way to take the data from the clipboard during a copy/paste operation?
Yes I'm a bit unaware of my tools, but know Python will help me on my way ...somehow you can guess that I'm a bit lost on what to do and where to go, so any directions/pointers would be veeeery gratefully accepted.
of course I'll post my code as I go. Just snippets of ideas for now.
April 20th, 2005, 11:00 AM
April 20th, 2005, 01:49 PM
excellent, thanks. i'll give it a try
April 21st, 2005, 05:37 PM
If you are only interested in Windows then you can use the ImageGrab module, included with PIL; this might not be what you're looking for though: