Capture done script property Capture One 11
In the library of Capture One 11 there's an new property called "Capture done script" with get/set acces. Does anyone has an example on how to use this property in a script.
I want to use it for Copying the capture name into the status title of the metadata after Capturing an image.
Thanks!
I want to use it for Copying the capture name into the status title of the metadata after Capturing an image.
Thanks!
0
-
This has been around for a bit, fwiw. It only has one value - the .scpt file that gets called when a transfer from a tethered camera is complete. 0 -
@ben_US Sorry, didn't know. I'm pretty new into scripting. Do you have an example how to use it?
Thanks,
Patrick0 -
Hiya Pat
Heres a simple way of using the script.
Suppose that that you save your script as myCaptureDoneV1.scpt in folder ~/Documents/Scripts, and that your user IDthe short name for your user folder on your mac is "pat".
To use it, then you would execute this Applescript when you set up Captures:BTW here is a relevant posting
tell application "Capture One 11"
set batch done script to alias "Macintosh HD:Users:pat:Documents:Scripts:myCaptureDoneV1.scpt"
end tell
In myCaptureDoneV1.scpt you can write whatever Applescript you want to run after the image is captured, using "Script Editor".
The difficulty is finding the last image captured. capture name is the current next capture name, not the name of the image just captured.
The only record of the image just captured is last captured file (file, r/o) : The last captured image file.
A simple way to proceed is to assume that C1 is set up so that the browser organises the images in date or name order, and so the last capture is simply the last variant and last image. that leads to the following script for myCaptureDoneV1.scpt Simple, but not robust.tell application "Capture One 11" to tell current document
set thevariant to the last variant
set thename to get name of last image
set status title of thevariant to thename
end tell
## not debugged
A more complicated approach, which should be quite robust, is to find the image attached to last captured filetell application "Capture One 11" to tell current document
if missing value = last captured file then
error "File information for the last captured file is missing"
else
try
set theImage to the first image whose file is last captured file
set theVariant to the first variant whose parent image is theImage
set status title of theVariant to get name of theImage
on error
error "Could not find the image associated with the lat captured file"
end try
end if
end tell
## not debugged0 -
Wow Eric, Thanks! This pointed me in the right direction.
I'm going to play around with it.
Thanks
Patrick0
Post ist für Kommentare geschlossen.
Kommentare
4 Kommentare