Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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>". isn't even scriptable. – user495470 Jul 25 '11 at 23:18
See also Imgur / screencapture scripts — Gist. (Doesn't answer the OP's question, hence a comment.) – user495470 Jul 25 '11 at 23:33
up vote 1 down vote accepted

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"'
share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer


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.