I am new to scripting and after going through the AS Dictionary for PhotoShop, I can’t find the way to get the list of currently opened flles in PhotoShop.
Or at least a command to have the frontmost document to move to second position or to back?
tell application "Adobe Photoshop CS"
--to get the paths of the opened files, use:
set file_paths to file path of documents
--to get the names of the opened files, use:
set file_names to name of documents
--to make the current document not the current document:
set file_count to count documents
if file_count > 1 then
set current_document to name of current document
repeat with i from 1 to file_count
set current document to document (item i of file_names)
if name of current document is not current_document then exit repeat
end repeat
end if
end tell