Installed SL yesterday, and started to customizing my installation today.
I've got a script that automatically changes the names of screenshots I take, but it doesn't work any more since SL because SL uses way too long and strange screenshot names.
In Leopard the names of my screenshots were "Afbeelding 1" (Dutch for Image 1) and my script changed it to "1_screenshot".
However, when I take a screenshot in Snow Leopard, the default name is "Schermafbeelding 2009-08-30 om 11.03.04" (translated: Screenimage 2009-08-30 at 11.03.04).
I hate long filenames, and I want to change them. I just don't know how.
I tried to change my script, but to no avail...
Can anyone help? I'm sure I'm not the only one who finds this frustrating...
I've got a script that automatically changes the names of screenshots I take, but it doesn't work any more since SL because SL uses way too long and strange screenshot names.
In Leopard the names of my screenshots were "Afbeelding 1" (Dutch for Image 1) and my script changed it to "1_screenshot".
However, when I take a screenshot in Snow Leopard, the default name is "Schermafbeelding 2009-08-30 om 11.03.04" (translated: Screenimage 2009-08-30 at 11.03.04).
I hate long filenames, and I want to change them. I just don't know how.
I tried to change my script, but to no avail...
Code:
--Written by MacTipper for The MacTipper Blog: http://mactipper.com/
--This script allows you to change the default name of screenshots by combining it with a LaunchD script.
--Everything there is to know about screenshots: http://www.mactipper.com/2008/08/everything-there-is-to-know-about.html
property the_suffix : "_screenshot" --Everything that will appear after the number except for the extension.
property folder_path : "/Users/Jeroen/Pictures/Screenshots/" --Posix path to your screenshots folder. You can change the folder with this tip: http://tinyurl.com/changescreenshots
property default_extension : ".jpg" --Change this to the extension of screenshots you take.
on run
tell application "Finder"
set action_folder to ((POSIX file folder_path) as alias)
set folder_items to every item in action_folder
end tell
repeat with an_item in folder_items
tell application "Finder"
set item_name to name of (an_item as alias)
set the_comment to (get comment of (an_item as alias))
log item_name
end tell
if the_comment does not contain "managed" then
set an_item to (an_item as alias)
if (item_name ends with default_extension) then
if (item_name begins with "Schermafbeelding") then
set x to 0
repeat
set x to x + 1
set the_name to (x & the_suffix & default_extension) as string
set the_path to (POSIX file (folder_path & the_name)) as string
tell application "Finder"
try
(the_path as alias)
on error err
log err
if err is (("File " & the_path & " wasn’t found.") as string) then
exit repeat
else
return err
end if
end try
end tell
end repeat
tell application "Finder"
set comment of an_item to (comment of an_item) & " managed"
set name of an_item to the_name
end tell
end if
end if
end if
end repeat
end run
Can anyone help? I'm sure I'm not the only one who finds this frustrating...