1
Apr
written by cail.cn • posted in How-To • 453 views 1 comment

There are very neat things in mac osx. For example, this Folder Action
4B3E5204-EED0-49D8-96A1-EA30343FDE69.jpg

I do a lot of screen capture on the iMac, and love the “command+shift+4″ shortcut. However, one thing really bothers me is that the screen capture file is named as “Picture 1.png” etc. Based on instruction here and the original AppleScript, I find the solution.

  1. Download the AppleScript and put it into _root_/Library/Scripts/Folder Action Scripts/. (I host a copy of Ryan’s script here, renametodatetimeandmovetodatefolder.zip)
  2. * I modified the original script a little, in which way the screen capture file will not be moved to a year-month-day sub-older. Here is the original script,
    20090401120050.png
    and I modified (deleted several lines and changed one variable) the end into

    set thePhotoFolderName to ((yearNum as string) & "-" & (monthNum as string) & "-" & (dateNum as string))
    set the target_folder to theFolder
    -- rename the file to the new file name
  3. Enable the Folder Action via contextual menu
    20090401115414.png

    I did for my Desktop folder (my default location)
    20090401122225.png
    and sign the AppleScript to it
    20090401115454.png

  4. Yes, it is working now. By the way, if you are not sure where is the default location, try the following in the terminal
    defaults write com.apple.screencapture location /Full/Path/To/Folder

    and use the following to enable it

    killall SystemUIServer
  5. Have fun!

Leave a Reply

 

En.dogeno.us - CaiLog © cail.cn | Licensed under a Creative Commons License