Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been researching for a day or two but can't find a method to take a screenshot of a specific window (possibly the only window) open at a specific time using an Apple script.

Currently I have the script execute

screencapture -T1 ~/Desktop/screenshot.png

But what I want is really

screencapture -wx -T1 ~/Desktop/screenshot.png

But when I use -wx, it waits for a mouse click on the window.

Are there any utilities, built in or not, that will allow me to do this?

Thank you so much!

(I'm sorry if this belongs on Stack Overflow, can someone move it if it does. It kind of overlaps both super user and stack overflow.)

Edit: The windows alternative that I'm looking for on a Mac is the keyboard shortcut:

Alt + PrntScrn
share|improve this question
    
Are you looking for a keyboard shortcut or a command you can use in a script? –  fideli Jan 14 '10 at 2:10
    
Can I ask why do you need to applescript it? –  Paulo Mar 21 '10 at 15:05

2 Answers 2

Snapz Pro X is a full features screen capture program. I use it. It is awesome. But if you're looking for a less expensive way (it's $70 I think...but it's worth it!) then try "command-shift-3". This will take a picture of your entire screen.

TUAW has an article using Applescript to do this. You can do a delay 5 to delay execution for five seconds in Applescript to accomplish your task.

This is a semi-dupe of this question: SuperUser: Taking screenshots on a Mac

share|improve this answer
    
He wants to take a screenshot of a specific window without clicking on it. –  Josh K Mar 21 '10 at 13:22

Very easy to do. Hit Command + Shift + 3. You will notice the screenshot image appearing on your desktop. Note you didn't have to click anything!

Now open it up in Preview and crop to the specific window you want.

share|improve this answer
    
:) just a quick comment... you still have to click on it to crop in Preview, unless you can crop images in applescript to a specific window. –  Vervious Apr 25 '10 at 17:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.