AppleScript event documentation

Discussions, questions, comments and suggestions regarding Capture One PRO, Capture One DB and Capture One Express 8x and 7.x

AppleScript event documentation

Postby mkphotomedia » Mon Sep 30, 2013 9:13 pm

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?
mkphotomedia
Certified Professional
Certified Professional
 
Posts: 80
Joined: Thu Nov 17, 2011 9:54 pm
Location: Vancouver, Canada

Re: AppleScript event documentation

Postby rapdigital » Fri Oct 04, 2013 10:56 pm

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
rapdigital
Certified Professional
Certified Professional
 
Posts: 185
Joined: Mon Feb 02, 2009 1:52 pm

Re: AppleScript event documentation

Postby hsautter » Sun Oct 06, 2013 4:51 am

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.
hsautter
 
Posts: 11
Joined: Sat Jun 05, 2010 4:05 am

Re: AppleScript event documentation

Postby mkphotomedia » Mon Oct 07, 2013 5:02 am

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.
mkphotomedia
Certified Professional
Certified Professional
 
Posts: 80
Joined: Thu Nov 17, 2011 9:54 pm
Location: Vancouver, Canada

Re: AppleScript event documentation

Postby NNN634574339181426722 » Tue Apr 22, 2014 11:06 am

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 !
NNN634574339181426722
 
Posts: 1
Joined: Mon Nov 21, 2011 1:58 am


Return to Capture One 8.x and 7.x Software



Who is online

Users browsing this forum: No registered users and 9 guests