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. ⚠️

Open Catalog based on filename

Comments

1 comment

  • Simon Knight
    I've made a start by "borrowing code found on this forum" . I am unable to test as I'm doing a new import that will take hours.

    Proof of concept with hard coded variables .

    use AppleScript version "2.4" -- Yosemite (10.10) or later
    use scripting additions

    set tTargetImageName to "NameOfImageToDisplay"
    --tell application "Finder" to open :Users:skids:Pictures:Capture_One_Catalog.cocatalog

    tell application "Capture One 12" to open POSIX file "/Users/skids/Pictures/Capture_One_Catalog.cocatalog"

    tell application "Capture One 12" to tell current document
    set current collection to collection "All Images"
    set AllVariants to (get variants)
    set countOfVariants to count of AllVariants

    set everyImageIDList to get id of every image
    --set everyImageIDList to get name of every image

    repeat with v_Counter from 1 to countOfVariants
    set thisVariant to item v_Counter of AllVariants
    set searchedImage to (get parent image of thisVariant)
    set searchedImageName to (get name of searchedImage)

    if searchedImageName = tTargetImageName then
    set searchedImageID to (get id of searchedImage)
    select the image searchedImageID
    exit repeat
    end if
    end repeat
    end tell
    0

Post is closed for comments.