On Windows I use GreenShots, which by default saves each screenshot with a timestamp followed by the name on the title bar.

I'd like to replace the "Screen Shot DATE at TIME" with "YYYYMMDD_HHMMSS Whatever on Title Bar".

This would make my screenshots easier to:

  • order by date, just ordering them by name
  • find out with a simple search (looking at the title)

Is some way achieve this?

| improve this question | | | | |
  • I would use a combination of applescript and the command screencapture to achieve what you would like to do. If I have some time I'll write it and post it as an answer. – Deesbek May 20 '16 at 14:19
  • Sans a third party screen capture app for OS X that does what you want, if one even exists, creating your own is what you'll need to do. You can use Automator and or AppleScript in conjunction with screencapture as mention in the other comment. – user3439894 May 20 '16 at 14:29

Here is the appleScript that would achieve what you are looking for:

do shell script "screencapture -W ~/tmp"
delay 3
tell application "System Events"
    set frontApp to name of first application process whose frontmost is true
end tell
tell application frontApp
    if the (count of windows) is not 0 then
        set window_name to name of front window
    end if
end tell
set screenShotName to do shell script "date +%Y%m%d_%H%M%S_"
set screenShotName to screenShotName & window_name
do shell script "mv ~/tmp ~/\"" & screenShotName & "\".png"

Copy and paste the above into appleScript editor then save it as an app, you can name it whatever you want.

Double click the app icon select the window you want screenshoted and then make sure that you click that window to ensure it is the front one.

| improve this answer | | | | |
  • Thanks. How do I set this up? – Agostino May 20 '16 at 16:20
  • It does save my screen, but all the screen (not just the window), and I need to manually run it, so it saves its own name. – Agostino May 20 '16 at 16:28
  • that should have fixed it for you. I have also added instructions on how to run it. – Deesbek May 20 '16 at 17:45
  • Now the app works, but saves a script named tmp, without any extension. Also, it but exits with an error if I press Esc. The idea is good though :) – Agostino May 23 '16 at 8:16
  • when I test it works, the name changes works, you just need to click on the window you want to bring it to the foreground. – Deesbek May 23 '16 at 17:56

You must log in to answer this question.

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