Hi,
wondered if anybody could give a few pointers on a script i’m writing
Aim
I want to use a list to extract different cobinations of files* from a defined folder, I would then like that same list selection to choose between mutliple photoshop actions and run the extracted file combination through that action.
*extracted files have a standardised naming convention
Current Issues
-getting the returned list selection to run the photoshop action
-how to repeat the action on multiple images.
Project Breakdown
Stage 1
-on opening run a list
-List to conatain a set of names relating to photoshop actions
-select action name from list
Stage 2
-choose folder with source images (always 14 images always with the same last 9 characters _0000.tif to _0013.tif)
-Choose a save folder
Stage 3
-dependant on original list selection, gather files from source image folder and run them through a coresponsing photoshop action
e.g If “Action 1” selceted from List select image “_0001.tiff & _0010.tif” from source folder and do photoshop action “Action1”
Stage4
-save in chosen “save folder”
Current Script
--Stage 1--
set PhotoshopActionList to {"Action1", "Action2", "Action3", "Action4", "Action5"}
set ActionrequiredAnswer to choose from list PhotoshopActionList with title "Actions Picker" with prompt "Choose Action?"
if ActionrequiredAnswer is false then
error number -128 (* user cancelled *)
else
set ActionrequiredAnswer to ActionrequiredAnswer's item 1 (* extract choice from list*)
end if
end run
--Stage 2--
property SourceFolder : missing value
property destinationFolder : missing value
if SourceFolder = missing value then
set SourceFolder to (choose folder with prompt "Choose Base Images:")
set destinationFolder to (choose folder with prompt "Choose Save Location:")
else
tell application "Finder"
set theFolders to every item of entire contents of SourceFolder as list
repeat with thisFolder in theFolders
make new alias file at destinationFolder to thisFolder
end repeat
end tell
end if
--Stage 3--
tell application "Finder"
set filesList to {files of entire contents of SourceFolder contains "_001", "_002", "003"} as alias list
end tell
tell application "Adobe Photoshop"
repeat with aFile in filesList
open aFile
do action "Action1" from "Actionsfolder"
end tell
--Stage 4--
save currentDocument in folder destinationFolder as JPEG
Thanks