Macro for taking screenshot on mac

broken image
broken image

One way of going about doing this would be to use NSTask in conjuction with the ‘screencapture’ command line command. The idea being you could write a quick script to access the image when you needed it, without having to have the script actually run on that machine.īut seriously, Apple has some other sample code called “Son of Grab” which uses the new CGWindow API which is pretty awesome. The MacFuse demo worked by creating a new screenshot each time a folder was opened, or something like that. The screencapture utility has been around since 10.2, according to the man page, and could be linked to a Cocoa application by use of NSTask.

broken image

Two interesting options I have seen, but yet to use professionally, are the screencapture utility and a MacFuse demo. How to take screenshot programmically of desktop area in Mac OS X ?