1
Apr
There are very neat things in mac osx. For example, this Folder Action

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.
- Download the AppleScript and put it into _root_/Library/Scripts/Folder Action Scripts/. (I host a copy of Ryan's script here, renametodatetimeandmovetodatefolder.zip)
- * 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,

and I modified (deleted several lines and changed one variable) the end intoset 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 - Enable the Folder Action via contextual menu
I did for my Desktop folder (my default location)

and sign the AppleScript to it

- 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/Folderand use the following to enable it
killall SystemUIServer
Have fun!
I delete the code "move (this_item) to theFolder" from the AppleScript. The file is in the right place and does not need to be relocated. Actually, with that code, the computer will be confused and there will be no file display on the Desktop - the file is there, you can find it in Finder - how strange @#$%