Does anyone know how to use the AppleScript dictionary?
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!
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!
0
-
Never mind, I figured it out. 0 -
I am interessed in making scripts. What was way to do it? 0 -
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!0 -
Hi Nordtech,
I missed your anwser from December 🤭 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.0
Post is closed for comments.
Comments
4 comments