views:

200

answers:

4

Hi Everyone,

I want to write an AppleScript or Cocoa application in Mac OS X which will take screen shot of the email inside AppleMail and Microsoft Entourage.

I did this by writing a simple AppleScript code but it takes the screen shot of the page. If email is a long one, I am unable to take screen shot of following pages.

Do you have any suggestion? Thanks.

A: 

This is an age old question, and a difficult one to solve.

The way I would solve it would be to take a screen shot (or preferably an image of the window) every few micro seconds as you scroll down. The reconstruct the image by matching lines of pixels.

Unfortunately I can't help you with the specifics of the programing, I'm guessing you have to dig down into the WindowServer or possibly even deeper to grab the screen image data.

Once you've got that, reconstruction will be relatively simple.

If it just long 'web pages' you need to capture you can always try SnapWeb it uses WebKit just like Safari and Mail, and will output long pages as one image, this at least solve half the problem.

rjstelling
Thanks for the suggestion. However, it seems to be beyond my skills at the moment. I will try to find an alternate way just like printing as PDF and then converting into JPG.
TamTam
+1  A: 

Could you print the email to a PDF and convert it to an image?

Dale
Nice idea, I will give it a try. Thanks.
TamTam
Good idea, but be advised that I have found printing is often very different to screen rendering.
rjstelling
Yes, it may generate different results. I will give it a try and keep you updated.
TamTam
A: 

It's probably not the answer you're after, but someone else has managed to solve this problem. There's a service called LitmusApp that does this for many email clients and platforms. Worth a look and they have a free version.

Singletoned
I think they actually just screengrab the email client
nduplessis
Thanks Singletoned, yes, I found LitmusApp, PreviewMyEmail.com and ReturnPath.net services that provide email screen shot service. But they do not meet my needs :) Thanks again.
TamTam
A: 

If you are trying to save the contents of email messages this app may be a good choice for that purpose.

alexy13