Zum Hauptinhalt gehen

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

Tagging Images with Applescript

Kommentare

1 Kommentar

  • Mark711
    It is possible to step through each image and tag it if it is in a list. For this script to work you have to have a list to compare to myImages my list is called imageName and is extracted from emails that are sent from our online proofing area. When the email arrives it's subject triggers the script which grabs it's contents, extracts the list of images, opens the job, tags the images in the list and starts them processing. This full script will probably not work for others without some modification but it shows that C1 PRO can be scripted and some of it's shortcomings can be handled by scripting the UI itself (i.e. simulating key strokes etc.)

    To test this portion of my script place four images into the captures folder of the Default session and name them Image1.tif, Image2.tif and so on through 4. Also for grins tag images 1 and 2 to yes. Upon running the script you should see images not in the list get untagged and Image4 get tagged and processed. Also if you don't still have the default process destination "High Quality" change the name of the process destination in the script to one of your own

    Example:

    set imageName to {"Image4.tif"} as list
    --return imageName
    set defaultSession to ((path to pictures folder) & "Capture One Default Session:Default.session") as string
    --return defaultSession

    tell application "Capture One PRO"
    activate
    open (defaultSession)
    -- the session we're working on
    set mySession to session "Default"
    -- get the images to process
    set myImages to every image of capture favorite folder of mySession
    -- set process target
    set myTarget to process destination "Web Proof"

    --return myImages
    --Brings app to front
    tell application "System Events" to tell process "Capture One PRO" to set frontmost to true

    --Switch to thumbnail view
    tell application "System Events" to tell process "Capture One PRO" to keystroke "2" using command down

    --Set focus of the window to where the thumbnails are
    activate application "Capture One PRO"
    tell application "System Events"
    tell process "Capture One PRO"
    tell group 1 of window "Captures"
    set value of attribute "AXFocused" of scroll area 1 to true
    end tell
    end tell
    end tell

    --Go to first image ( command + Home )
    tell application "System Events" to tell process "Capture One PRO" to key code 115 using command down

    tell application "Finder"
    if exists file (defaultSession) then
    tell application "Capture One PRO"
    activate
    --This section will tag images in the list imageName to "yes" and untag images not in imageName.
    repeat with myImage in (get myImages)
    if {id of myImage} is in imageName then
    tell application "System Events"
    tell process "Capture One PRO"
    set frontmost to true
    keystroke "t" using command down
    key code 124
    end tell
    end tell
    else
    tell application "System Events"
    tell process "Capture One PRO"
    set frontmost to true
    keystroke "u" using command down
    key code 124
    end tell
    end tell
    end if
    end repeat
    end tell
    end if
    end tell
    -- process image files
    tell application "Capture One PRO"
    repeat with myImage in myImages
    if tag of myImage is yes then
    start processing myImage target myTarget
    end if
    end repeat
    end tell
    end tell


    Hope this helps those who wish to use Applescript with C1 PRO.

    Good Luck,
    Mark
    0

Post ist für Kommentare geschlossen.