Applescript noob here with a question that is (hopefully) simple to resolve.
This is for Photoshop CS3, Mac OS 10.5.5.
I have a server packed with thousands of Photoshop EPS images. They’ve been created over a period of several years and the clipping paths aren’t named consistently. What I need is a script that can rename every single clipping path in a given folder. I have a rudimentary routine that appears to function but doesn’t actually do anything. I assume it’s my syntax, could someone please take a look and let me know how far off the mark I am?
tell application “Adobe Photoshop CS3”
activate
set the source_folder to (choose folder with prompt “Choose folder or files for path renaming.” without invisibles)
set the item_list to list folder source_folder without invisibles
set source_folder to source_folder as string
repeat with i from 1 to number of items in the item_list
set this_item to item i of the item_list
set aFile to (source_folder & this_item) as alias
try
with timeout of 20 seconds
open aFile showing dialogs never
tell current document
if exists (path item whose kind is clipping) then set path name to "Path" --I suspect this is the problem area--
end tell
end timeout
end try
save current document
close current document saving no
end repeat
end tell
Any help would be appreciated.