Getting default values ?

Discussion regarding all scripting related questions
Please DO NOT post to this thread anything that is not directly related to scripting of Capture One.

Getting default values ?

Postby HugoinParis » Mon Oct 21, 2019 2:54 pm


The following script assigns my preferred profile to a picture

Code: Select all
tell application "Capture One 11"
   set myModel to "Canon EOS 7D Mark II"
   set theHomeProfile to "Canon EOS-7D MK II Home"
   set theVariantList to selected variants
   repeat with theProcessVariant in theVariantList
      tell theProcessVariant
         set theModel to get EXIF camera model of its parent image
         if theModel is equal to myModel then
            set theName to name of its parent image
            set theSuffix to my getSuffix(theName)
            if theSuffix is equal to "CR2" then
               log theModel & theName
               set Mytest to get color profile of adjustments
               -- set color profile of adjustments to theHomeProfile
            end if
         end if
      end tell
   end repeat
   log "process over"
end tell

on getSuffix(theName)
   set saveTID to AppleScript's text item delimiters
   set AppleScript's text item delimiters to {"."}
   set theExt to last text item of theName
   set AppleScript's text item delimiters to saveTID
   return theExt
end getSuffix

It has however a side effect : it marks the picture as "adjusted", which I don't want.

Basically I understand I could avoid this if I could assign the default profile
(a function part of the "basics characteristics" tool, named something like "Apply default", which does not tag the picture as "Adjusted")

Code: Select all
set color profile of adjustments to default

returns an error [color profile name not recognized (-10006)]

Any idea if this is scriptable ?
Posts: 27
Joined: Thu Oct 19, 2017 12:19 am

Re: Getting default values ?

Postby Eric Nepean » Wed Oct 23, 2019 4:05 am

I can't find a way to change the profile without affecting the adjusted stae of the variant.

However. I do note that instead of using getSuffix(theName) you should just be able to use this:

Code: Select all
      tell theProcessVariant

            set theName to its name
            set theSuffix to extension of its parent image

      end tell
Eric Nepean
Posts: 637
Joined: Sat Oct 25, 2014 8:02 am
Location: Ottawa

Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest