From Smart Album to physical copy into a new folder in the hard drive
Hello scripters,
I am fairly junior with scripting in C1, have version 23, and am failing even with the help of Chatgpt4 to compile a script that copies in a specified folder in the Desktop (OS Ventura) the images identified by a smart album (5+ criteria used) under my user collections.
I do not seem to be able to find the appropriate class to use. Any help is very much welcomed!
"
tell application "Capture One 21"
set smartAlbumList to name of every smart album
if (count of smartAlbumList) is less than 1 then
display alert "No Smart Albums are available in Capture One."
return
end if
set chosenSmartAlbum to (choose from list smartAlbumList with prompt "Please select a Smart Album:" without multiple selections allowed) as text
if chosenSmartAlbum is "false" then
return
end if
set imageVariants to get image variants of smart album chosenSmartAlbum
if (count of imageVariants) is less than 1 then
display alert "No images are available in the chosen Smart Album."
return
end if
end tell
set desktopPath to (path to desktop) as text
set targetFolderName to "C1.SmartAlbum.EXTRACT"
set targetFolderPath to desktopPath & targetFolderName
tell application "Finder"
if not (exists folder targetFolderPath) then
make new folder at desktopPath with properties {name:targetFolderName}
end if
repeat with imageVariant in imageVariants
set imagePath to (get image path of imageVariant) as text
set imageFile to (imagePath as alias)
move imageFile to folder targetFolderPath
end repeat
end tell"
Anybody can help me to debug, or if not possible to script it in Apple Script, to find an alternative to automate or semi-automate such action in C1?
-
There is quite a bit wrong with this which would take a while to fix. ChatGPT does some things well, but also makes ghost/sudo code that simply doesn't exist in the model.
Fortunately, you don't need to script to solve your problem.
Either:
Select and use File>Export>Export Original Files...
You will get a dialog asking where to - make sure to include settings. This will make a copy of RAW+ settings in the destination. I guess by adding a shortcut to the Export function it is semi-automated - your script seems to assume a fixed export folder, so once set you should just need to hit the shortcut and then return to commit and Export.
You can also drag drop files (select and drag from browser area) and drop into the destination folder in the library tool, holding ⌘ to copy.
0 -
Thanks for the feedback, much appreciated.
0
Please sign in to leave a comment.
Comments
2 comments