Search code examples
xcodewindowapplescript

How do I program grab to capture a window in applescript xcode


I need to make the application "Grab" capture a window with applescript in xcode 3.2. What could be the script for this?


Solution

  • I did not found anything directly useable in the AppleScript World, so I would suggest to use screencapture - a command line tool - and call that from your script. Execute man screencapture in Terminal.app to see its manUAL.

    Side-Note: the AppleScript Command to do shell scripting is do shell script (from "StandardAdditions").

    ("Grab" does not support AppleScript)