Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Can anyone recommend a screen capture tool that can:

  1. save a capture as a file, and...

  2. copy the path to that file to the clipboard?

The first part is easy, but I can't find a utility that does the second part.

I dont need another app if there's a way to configure this using the built-in screen capture tool.

share|improve this question
    
There might be other ways to get to your ultimate goal. What do you want to do with the path in the clipboard afterwards? –  patrix Sep 18 '12 at 3:42
    
I'm pasting the file paths into a Markdown file as I take notes during screencasts. The workflow I'm after is to take the capture and quickly paste the path into markdown so the captured image appears in my output file. Would welcome any suggestions - also trying out Lri's solution now. –  cantera25 Sep 18 '12 at 4:00
    
So you probably need a way to specify the path before taking the screenshot as well (otherwise your file links will break afterwards). Hmm, Automator maybe? –  patrix Sep 18 '12 at 4:55
    
Yep - specifying the path was the key as shown in Lri's script. The FastScripts app that Lri recommended then worked perfectly for executing. –  cantera25 Sep 18 '12 at 5:31

1 Answer 1

up vote 5 down vote accepted

You could just assign a shortcut to a script like this:

#!/bin/bash

f=~/"Desktop/$(date '+%Y%m%d%H%M%S').png"
screencapture -i "$f"
echo -n "$f" | LC_CTYPE=UTF-8 pbcopy

See man strftime for a reference of the date format.

share|improve this answer
1  
This worked brilliantly, thank you - and you taught me a new skill in the process. Thanks again –  cantera25 Sep 18 '12 at 5:27
    
Any chance you also know how to tell the bash script to capture at higher resolution? I'm happy to post this as a new question if you prefer. –  cantera25 Sep 18 '12 at 5:29
    
What do you mean by higher resolution? Like when using a HiDPI mode? It should probably be another question though. –  ؘؘؘ Sep 18 '12 at 8:44

Your Answer

 
discard

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.