Is there a way to simulate screen capture command "shift+command+4"

Hi, I want to use “shift+command+4” and press the space key to screen capture a particular window. I tried this:
tell application “System Events”
delay 1
keystroke “4” using {command down, shift down}
delay 1
keystroke space
–then I use a tool to simulate a mouse down
end tell

But it doesn’t work. Does any one know how to do this?

Thanks

Model: MacBook Pro 986
AppleScript: AS 2.0.1
Browser: Safari 533.16
Operating System: Mac OS X (10.5)

Hi,

This is not quite what you want but might suffice or could be adapted.

See Post 11 at http://macscripter.net/viewtopic.php?id=21492

Also a search on screen capture or screencapture could turn up just what you want.

Val

Here’s one way of doing it… and suggestions for others:

http://macscripter.net/viewtopic.php?id=18840

Peter B.