I am not very good with AppleScript but I would imagine this is something quite easy for the AppleScript guru out there, I am looking to make a screenshot of a region like with doing Apple-Shift-s and feed it the ScreenShot filename to a shell script which would take care of the upload.


PS: I don't need the shell script part just the AppleScript one.

  • 2
    Actually it sounds rather hard to bend AppleScript to this task. Why not just use folder actions to kick off your already done upload script and save your snaps in the folder? Also skitch is what I use, but you might want to learn script and not just solve this one issue. – bmike Jun 28 '11 at 12:59
  • CloudApp is free, and will automatically upload your screenshots and give you a link to them. It might be a good option for you. – Nathan Greenstein Jun 28 '11 at 13:49
  • The only way I know to take screenshots with AppleScript is do shell script "screencapture <parameters>". Grab.app isn't even scriptable. – Lri Jul 25 '11 at 23:18
  • See also Imgur / screencapture scripts — Gist. (Doesn't answer the OP's question, hence a comment.) – Lri Jul 25 '11 at 23:33

simply run shell command:

screencapture -i filename

this will start screencapture in interactive mode (selecting region). See screencapture -h or man screencapture

If you realy need run the screencapture command from the applescript just use:

do shell script "screencapture -i filename"

you can test the applescript from shell:

osascript -e 'do shell script "screencapture -i /tmp/filename.png"'

See my answer to the question linked to below which uses Automator to take screenshots and feed them automatically to the FTP script. Since you don't say that it absolutely has to be done by Applescript, I'm just offering it as a suggestion in case it covers your needs.

Seeking ambient screen recorder


You could try adding an automator folder action that will take added files and upload them. If you have fetch it has its own FTP options that can be integrated into an automator routine.

If that doesn't work for you, the app Nathan suggested performs what you need wonderfully.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .