Does anyone know how to use the AppleScript dictionary?

Discussions, questions, comments and suggestions regarding Capture One PRO, Capture One PRO(For Sony), Capture One DB and Capture One Express(For Sony) 8.x.

Does anyone know how to use the AppleScript dictionary?

Postby nordtech » Mon Dec 28, 2015 8:05 pm

I have been trying to use the AppleScript dictionary in Capture One and am having great difficulty in getting the results I want. I have tried searching for any information on how to use the dictionary, but have been unsuccessful in finding any documentation or instructions to help demystify it. Can anyone here shed any light on how to use it?

Specifically, what I am trying to do is set the folder that Capture One will process images to. I was thinking 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!
nordtech
 
Posts: 14
Joined: Wed Feb 06, 2013 7:01 pm

Re: Does anyone know how to use the AppleScript dictionary?

Postby nordtech » Tue Dec 29, 2015 10:53 pm

Never mind, I figured it out.
nordtech
 
Posts: 14
Joined: Wed Feb 06, 2013 7:01 pm

Re: Does anyone know how to use the AppleScript dictionary?

Postby MartinGJ » Thu Dec 31, 2015 7:03 am

I am interessed in making scripts. What was way to do it?
Thanks and Regards,
Martin
MartinGJ
 
Posts: 58
Joined: Fri Jul 01, 2011 7:02 pm

Re: Does anyone know how to use the AppleScript dictionary?

Postby nordtech » Thu Dec 31, 2015 6:10 pm

If you look at the AppleScript dictionary for Capture One, you will see that 'output' is a property of 'document'. What I failed to do was properly address who 'output' belonged to- a 'document'. Therefore my script needed to look like this:

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

By not declaring output as part of a document, it did not know what output was a part of.

Martin,
It sounds like you may not be that familiar with AppleScript. My apologies if the following information is too elementary. AppleScript dictionaries provide you with information that lets you know what you can script in an application. If the program has a dictionary, you can view it in AppleScript Editor or Script Editor (depending on what version of Mac OS X you have). In order to utilize the items in a dictionary, you will need to create a tell block identifying what application you are attempting to talk to. That is why the 'set output…' line is encased in the tell block above. If I did not declare 'tell application "Capture One 8" before the 'set output…' command, it will return an error when compiling.

Good luck with your scripting endeavors. If you have not already found macscripter.com, that is an excellent resource for learning how to use AppleScript. I hope that helps!
nordtech
 
Posts: 14
Joined: Wed Feb 06, 2013 7:01 pm

Re: Does anyone know how to use the AppleScript dictionary?

Postby MartinGJ » Sat Mar 12, 2016 8:34 am

Hi Nordtech,

I missed your anwser from December :oops: I found Macscripter and will give it another try.
And you are right. I have only little experience AppleScript, but I understand what you mean.
Thanks and Regards,
Martin
MartinGJ
 
Posts: 58
Joined: Fri Jul 01, 2011 7:02 pm


Return to Capture One 8.x Software



Who is online

Users browsing this forum: No registered users and 2 guests