how to set camera attributes
I'm new to apple script (not to programming in general) and try to build a little script which captures a sequence of images with different exposures (or other settings).
I simply do not understand the documentation on "camera" or "attributes" or the syntax how they can be modified with apple script. This is a the script so far with the attribute line missing...
It would be great if someone could be so helpful to point me in the right direction or fill in the missing code line. I've searched the net for examples or tutorials but no luck yet.
Best regards,
Volker Kunkel
I simply do not understand the documentation on "camera" or "attributes" or the syntax how they can be modified with apple script. This is a the script so far with the attribute line missing...
tell application "Capture One 20"
## set attribute "ISO" to 400 <-- how to do this??
capture
delay 5
## change camera setting, take next picture ...
end tellIt would be great if someone could be so helpful to point me in the right direction or fill in the missing code line. I've searched the net for examples or tutorials but no luck yet.
Best regards,
Volker Kunkel
0
-
AppleScript has a really bizarre syntax and can be difficult to learn if you already know some "real" programming.
You should be able to set the attributes like this:
tell application "Capture One 12.0"
set theCamera to camera of current document
set ISO of theCamera to "400"
capture
delay 5
## change camera setting, take next picture ...
end tell0 -
Applescript is an object oriented language.
Many of the new software languages since 1990 are object oriented; to use them effectively you need understand and consider objects.
For example lets look at the idea of a a "name". The document has a name. Every album in the document has a name. Every variant and every image has a name. Other things can have names. Some things do not have names.
How does a programmer find, or change the name of one of these things? Each of these things are objects. There are different types of objects, Document, Collection, Image, Variant, Camera, Browser, Viewer etc.
There maybe one or many or none of a type of object.
E.G.To get the name of the document which is now open, we have to state which document we refer to.
The following ways all work
get name of current document
get name of first document
get name of document 1
get document 1's name
To get or change ISO information about a camera, we need to realise that Capture one considers the camera to be part of the document, and it assumes there is only one camera.
The following code should work (I don't have a tethered camera)
get ISO of camera of document 1
get ISO of camera of (get current document)
set theDoc to get current document
get ISO of theDoc's camera
set theCamera to camera of current document
get theCamera's ISO
Unfortunately Apples' Script Editor is a poor tool for writing Applescripts, especially for the beginner; information about objects is difficult to get and poorly presented.
Late Nite Software has a tool called Script Debugger, which is much better; there is a lite version which is free (download the trial and keep running it after the trial expires)
Script Debugger has a window which shows all the objects of some software like Capture One, how the objects are related to each other, what kind of properties each object has, and what the current value of each property is. This make work much easier, especially for the beginning programmer.0 -
Thank you guys. That was really helpful and works like a charme! 0
Post ist für Kommentare geschlossen.
Kommentare
3 Kommentare