Help interpreting a dictionary

I am trying to decipher an AppleScript dictionary definition for the Capture One application. Here is the fragment that I think is what I need to access-

document‚n : A Capture One document. Contained variant elements are the selected variants only.
elements
contains images, recipes, jobs, collections, variants; contained by application, application.
properties
name (text, r/o) : The name of the document.
path (text or file, r/o) : The folder item containing the document.
kind (session/Œcatalog, r/o) : The kind of document.
output (text or file) : The Output folder item.
output sub path (text) : The Output sub folder item. Sub path tokens and text are separated with the | symbol. Folder names are separated with /. Invalid characters include :.

What I am trying to do is set the folder that Capture One will process images to. For those unfamiliar with Capture One, it is called the Output folder. What I was thinking is that I should be able to set it using the ‘output’ or ‘output sub path’ property, but I keep getting an error stating that it cannot set output (or output sub folder) to whatever path I specify. Here are some things I have tried, but nothing has worked.

tell application "Capture One 8"
	set output sub folder to "Users:wrh2:Desktop:testfolder" as alias
end tell

This returns the error- error “Capture One 8 got an error: Can’t set output sub folder to alias "m00972968:Users:wrh2:Desktop:testfolder:".” number -10006 from output sub folder

tell application "Capture One 8"
	set output to path to desktop
end tell

error “Capture One 8 got an error: Can’t set output to alias "m00972968:Users:wrh2:Desktop:".” number -10006 from output

tell application "Capture One 8"
	set output to POSIX path of (path to desktop)
end tell

error “Capture One 8 got an error: Can’t set output to "/Users/wrh2/Desktop/".” number -10006 from output

I am assuming this can be done and I just don’t know how I am supposed to script it. Any help would be appreciated!

Hey wrh,

Capture One is a bit difficult to script, and successfully interpreting its sdef without being able to test is near impossible.

I made some headway with the demo a while back, but my demo-period has expired.

http://macscripter.net/viewtopic.php?id=43999

Also:

https://forum.keyboardmaestro.com/t/rename-only-if-needed/1342/16?u=ccstone

There are a few posts for Capture One on MacScripter “ search for “capture one” in the Google field of the Search page.

http://macscripter.net/search.php

If you haven’t yet I’d ask for help on the Capture One forums. Few if any folks on MacScripter have much experience scripting it.


Chris


{ MacBookPro6,1 · 2.66 GHz Intel Core i7 · 8GB RAM · OSX 10.11.2 }
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Thanks for the tips Chris.

I did do a search for Capture One here in the forums, but found no direct answer to my question, although I did find the link you posted on.

I have posted on the Capture One forums in the past, but usually I never get any replies. :frowning: I feel as if I am one of very few people who are trying to script the application.

I also tried contacting their customer support, but they will not provide any support for AppleScript at all and say they provide the ability to use AppleScript with it as a courtesy, but you are on your own if you want to use it. :frowning:

peter

I figured this one out. Simple mistake on my part. I forget to specify the document I wanted to change the output on. So the code ended up being this:


tell application "Capture One 8"
set output of document 1 to (myPath as alias)
end tell

Hey Peter,

This is probably true.

They haven’t provided a very comprehensive (or very comprehensible) scripting dictionary “ nor have they provided good examples of what the current sdef can do.

So it’s hardly surprising that few people are trying to script it.

It amazes me that so few software developers provide clear, germane, and comprehensive examples of how to use their products.

-Chris

I believe the sdef was originally written for a previous version of the app, which has subsequently been comprehensively rewritten. So a lot of it is really phantom stuff. Dreadful.