Hi Tim
You should only spend so long watching those videos. The best way, and actually the only way, to learn Applescript is learn by doing.
Write a simple script. Then try to add something to it. It's broken. Google the command and the error message. Read the Applescript Dictionary. Open the Script Editor Log window. Check the Applescript events and replies. Fix it.
One of the key things is that when you are writing an Applescript, you should refer to the dictionary. Frequently.
Script Editor has a handy link to the Applescript Language guide. Here, click on the index, click on the first letter of a command, and then you will find all the references to a command. A normal human being can't possibly absorb the entire language reference, but individual sections pertaining to a command are very informative.
You have nothing to loose but your sanity
So:
- Make a folder for your Applescripts
- Open up script editor
- Open up the log Window
- Make a new empty script
- Open Up the Applescript dictionary for CaptureOne.
Try this, and compare very line to the Dictionary
- Code: Select all
tell application "Capture One 11"
set theVariantName to name of primary variant
log theVariantName
set theVariant to get primary variant
tell theVariant
set theLayerList to get every layer
repeat with theLayer in theLayerList
log {(get name of theLayer), (get kind of theLayer as text)}
end repeat
invert mask of layer "Layer 1"
set theFirstLayer to get layer "Layer 1"
set theSecondLayer to get layer "Layer 2"
copy mask theFirstLayer to layer theSecondLayer
invert mask of theSecondLayer
end tell
end tell
Do come back and tell us how its going.