Skip to main content

⚠️ Please note that this topic or post has been archived. The information contained here may no longer be accurate or up-to-date. ⚠️

Anyone managed to add a session favorite or album?

Comments

1 comment

  • Eric Valk
    The working code that I use is this:

    repeat
    tell application "Capture One 12" to tell ref2ResultProject
    if not (exists collection named (get nameResultAlbum & coll_ctr)) then
    set nameResultAlbum to (get nameResultAlbum & coll_ctr)
    set ref2ResultAlbum to make new collection with properties {kind:album, name:nameResultAlbum}
    exit repeat
    else
    set coll_ctr to coll_ctr + 1
    end if
    end tell
    end repeat

    This based on this post

    I think what might work for you is this:

    tell application "Capture One 12" to tell document 1 to set ref2NewAlbum to make new collection with properties {kind:album, name:"selected"}

    I think its useful and important to take note of Capture One's Applescript dictionary entry for Make

    make v : Create a new object.
    make
    new type : The class of the new object.
    [at location specifier] : The location at which to insert the object.
    [with data any] : The initial contents of the object.
    [with properties record] : The initial values for properties of the object.
    → specifier : The new object.

    You can probably include something like this to add the selected variants when you create the collections:
    with data (every variant whose selected is true)

    For a session, if you use favorite instead of album then you likely have to specify the folder property, since a favorite cannot exist without a folder. This might either come as a property, as in:

    set ref2NewAlbum to make new collection with properties {kind:favorite, name:"selected", folder:someFolderRef}
    or perhaps with the the [at location specifier] clause as in

    set ref2NewAlbum to make new collection with properties at someFolderRef with properties {kind:favorite, name:"selected"}

    I have not tried using the [at location specifier] clause. Mostly I use catalogs, perhaps if the location is not specified, a default location is used.

    As always, proceed one step at a time. Get something that works, the minimum function. Then add stuff one step at a time.
    0

Post is closed for comments.