Hi There,
Applescript dictionary has no access to whether it was processed. To get access to that, I have to parse the RAW file's plist. Right?
The processed state doesn't seem to be in the RAW plist. Please post a solution if you figure one out.
You can test for the tag but it is read only.
- Code: Select all
-- Process image files
tell application \"Capture One PRO\"
repeat with myImage in myImages
if tag of myImage is nine then
start processing myImage target myTarget
end if
end repeat
end tell
To change the tag you have to write to the plist for that image.
- Code: Select all
-- Tag ordered images to 9
repeat with i in fullImagePlist
if i is in orderedImageNames then
do shell script \"defaults write \" & (quoted form of POSIX path of (settingsPath & i)) & \" Tagged -int 9\"
end if
end repeat
These code snips have some variables ( i.e. fullImagePlist, settingsPath which are HFS style paths like iMac HD:Users:marktorrance:Pictures:Capture One Default Session ) that are created elsewhere in a larger script so these won't function. I could give you the larger script if you want to mess with it. You would have to change a few lines to suit your set up. This particular script is triggered by an incoming email from our web server. The message triggers a rule in mail that triggers an applescript that:
reads the email
extracts a list of images that a client ordered
extracts the size and format
opens the job in C1 Pro
Tags & Processes the images
The email is from an online form so it's structure is controlled. So what this basically does is automatically process images ordered from our client area. If I'm in another shoot or out of the studio the images will get processed and be ready for me to go through. C1 does lack in the applescript department but I have been able to more then I first thought would be possible.
This example shows how to read the contents of the ImageSettings folder containing the plist files.
Change the first two lines of code to match your system.
- Code: Select all
--The path to the Default Session
set folderPath to \"iMac HD:Users:YOURUSERNAME:Pictures:Capture One Default Session:\"
--The path to the session file, make sure you have the correct session name
set sessionPath to (folderPath & \"Default.session\")
--The path to the Captures folder
set capturesPath to (folderPath & \"Captures:\")
--The path to the ImageSettings folder
set settingsPath to (folderPath & \"Captures:Capture One Settings:ImageSettings:\")
--Get names of all plist files in current job and remove .plist from name
tell application \"Finder\"
set fullImagePlist to the name of every file in the folder (settingsPath) as list
end tell
return fullImagePlist
You could of course use a prompt so the user can pick a session folder then get the name of the \".session\" file in that folder. Or prompt the user to select a session file and open it with finder which would do the same as double clicking a session file which is to open C1 and load that session. Here is an example
- Code: Select all
set mySessionFile to choose file with prompt \"Select a Session File \\\".session\\\"\"
tell application \"Finder\"
open mySessionFile
end tell
Hear are some scripts I wrote that you might find handy.
This one helps manage your session menu.
http://www.bwstudios.biz/downloads/CaptureOneProSessionManager.zip
And This one creates scripts that will create predefined process destinations.
http://www.bwstudios.biz/downloads/C1PROProcessCreator_1.0.zip
Good Luck,
Mark