Page 1 of 1

AppleScript event documentation

PostPosted: Mon Sep 30, 2013 9:13 pm
by mkphotomedia
I'm looking for any documentation/samples for what AppleScript events C1 can fire to background scripts, and when. The Knowledge Base documentations says that samples are available in the Extras folder on the C1 CD, but that's not around in C1 7.

Anything available anywhere?

Re: AppleScript event documentation

PostPosted: Fri Oct 04, 2013 10:56 pm
by rapdigital
here's a background script that plays a sound after capture
Code: Select all
on CO_CaptureDone(rawFilePath)
   playBeep("Glass")
end CO_CaptureDone

on playBeep(beepName)
   
   set donesound to quoted form of "/System/Library/Sounds/" & beepName & ".aiff"
   do shell script ("afplay " & donesound & " > /dev/null 2>&1 &")
   
end playBeep

Re: AppleScript event documentation

PostPosted: Sun Oct 06, 2013 4:51 am
by hsautter
Open the Apple script editor
Then from the file menu ... open dictionary.

You will find an entry for Capture One
with all the available script functions listed and explained.

For example:

application n : Capture One application class.
elements
contains images.
properties
processing done script (file) : (PRO Only) The AppleScript that gets called when a file is finished processing. The script is passed the identifier string of the finished batch job in argv 1, the original RAW file path in argv 2, and a list of the output file paths in argv 3.
selected variants (list of variant, r/o) : List of selected variants
app version (text, r/o) : The version of Capture One
primary variant (variant, r/o) : The primary selected variant
next capture adjustments (Default/‌Last/‌Primary/‌Custom/‌Default With Style/‌Last Using Clipboard/‌Primary Using Clipboard/‌Using Clipboard) : (PRO Only) When an image is captured, what adjustments should be applied?
shutter latency (Normal Latency/‌Zero Latency/‌Unknown Latency) : (PRO Only) Choose the Shutter Latency Mode used when capturing. Only has an effect when a camera is connected.

Re: AppleScript event documentation

PostPosted: Mon Oct 07, 2013 5:02 am
by mkphotomedia
What I'm looking for, in particular, is if there are any more events similar to what rapdigital posted with CO_CaptureDone (which isn't documented in the AppleScript dictionary--which I do know about).

For instance, is it possible to run an event when an image is sitting in the process queue but before the image is actually processed? Or, when a user clicks an image to open it? There's a 'processing done script', but is there anything I can do on/before processing start?

I'm trying to find some good ways to improve my workflow when dealing with multilayer .psd and .tif files, where you've processed several images, worked with them in Photoshop, but want to use C1 to organize everything and C1's process recipes to do final processing. Since C1 doesn't handle multilayer .psd/.tif files well, I've put together a set of Photoshop scripts to render a flattened proxy file that C1 does handle, but I'd like to be as smart as possible about keeping that flattened proxy up to date.

Re: AppleScript event documentation

PostPosted: Tue Apr 22, 2014 11:06 am
by NNN634574339181426722
Hi,
I'm interested in the same thing. It seems that Applescript dictionary is missing several events triggers, no ? Do you have any news on this ?
Thx !