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

Wait for HDR processing

Comments

5 comments

  • Eric Valk

    If you send CaptureOne a command while the hdr merge is running, it should not respond until the merge is complete.
    However AppleScript will time out if the delay is more than 60 seconds, and ignore any response after that.
    The AppleScript timeout can be changed by adding a “with timeout” clause to the command.
    If I recall correctly “with timeout 0” sets the timeout to infinity, and AppleScript will wait indefinitely until it receives a response.

    Method
    After the 5 keystrokes, send CaptureOne some innocuous command like “get count of images with timeout 0”, and AppleScript will wait until CaptureOne responds. Then ignore C1s response and do whatever comes next.

    0
  • FirstName LastName

    hi, do you make it works? really need this 

    0
  • Marsh Ray

    You can modify your script to eliminate the delay and check if the processing is done:

    tell application "Capture One"
        -- Your previous code to select photos and merge to HDR goes here
        
        -- Wait until the HDR processing is complete
        repeat
            tell application "System Events"
                if not (exists menu item "Merge to HDR" of menu 1 of menu bar item "Photos" of menu bar 1 of process "Capture One") then
                    exit repeat
                end if
            end tell
            delay 1 -- Wait for 1 second before checking again
        end repeat
        
        -- Select previous set and repeat the process if needed
        -- Your code to select previous set goes here
        
    end tell

    In this modified script, the repeat loop checks if the "Merge to HDR" menu item is still present in the Photos menu of Capture One rta check. If it doesn't exist, it means that the HDR processing is complete, and the script exits the loop. This way, you don't need to use a fixed delay, and the script will proceed as soon as the processing is done.

    0
  • Raul T.

    Marsh Ray Does this script work with 5 or 7 shots?

    0
  • Blake Blossom

    1. Using the busy property:

    This method checks the busy property of Capture One to see if it's currently processing images.

    AppleScript
    tell application "Capture One"
      tell current document
        repeat with theVariant in (reverse order of variants)
          tell theVariant
            select theVariant
            merge to HDR with default
            repeat while busy is true
              delay 1 -- Short delay to avoid overloading the CPU
            end repeat
          end tell
        end repeat
      end tell
    end tell
    Use code with caution.
    content_copy
    Explanation:

    We loop through the variants in reverse order (latest to oldest) to ensure proper HDR stacking.
    Inside the loop, we merge the selected variant to HDR and then enter a repeat loop.
    The repeat loop continues as long as the busy property of Capture One is true, indicating it's processing images.
    A short delay of 1 second is added within the repeat loop to avoid overloading the CPU with constant checks.
    2. Using the number of processing tasks property:

    Another approach involves checking the number of processing tasks property. This method might be slightly faster than the busy property check.

    AppleScript
    tell application "Capture One"
      tell current document
        set initialTasks (number of processing tasks)
        repeat with theVariant in (reverse order of variants)
          tell theVariant
            select theVariant
            merge to HDR with default
            repeat while (number of processing tasks) > initialTasks
              delay 1 -- Short delay to avoid overloading the CPU
            end repeat
          end tell
        end repeat
      end tell
    end tell
    Use code with caution.
    content_copy
    Explanation:

    We store the initial number of processing tasks before starting qatar id check, the loop.
    Inside the loop, we merge the selected variant to HDR.
    Then, a repeat loop continues as long as the current number of processing tasks is greater than the initial number.
    This indicates that Capture One is still processing images for this HDR stack.

    0

Please sign in to leave a comment.