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

First Ever Integration with Affinity Photo – Focus Merge, HDR Merge, Panorama, and Stack

Comments

9 comments

  • Walter Rowe
    Moderator
    Top Commenter

    Yes, this is macOS only. Capture One doesn't support scripting on Windows, and I have no clue if Windows offers UI scripting like macOS.

    0
  • Rick Allen

    Looks interesting Walter have you tested on other keyboard layouts, I've found that gui scripts break pretty easily?

     

     

    0
  • Walter Rowe
    Moderator
    Top Commenter

    I have not, and you raise an interesting thought I had not considered. I identify some button and menu items based on English language. For example, File menu, and File Menu item New Panarama, and button Add or button Open. If the locale differs, these apps will fail. How do handle that? Hmmm.

    0
  • Rick Allen

    I dont have affinity photo so cant help much but in the past using index numbers of the menu items has helped, but still subject to breaking with updates etc. Do you have UI browser?

    0
  • Walter Rowe
    Moderator
    Top Commenter

    I do not have UI browser. However, I've been quite successful using "entire contents of" and pilfering through the output, and narrowing things down.

    0
  • Eric Valk

    I don’t have affinity photo 2, only the previous version. But this is great news, I will be having a closer at this.
    Before I retired I tried this with Affinity 1 but didn’t get far.

    0
  • Walter Rowe
    Moderator
    Top Commenter

    Eric Valk

    When I was researching UI scripting online I found lots of scripts that used click and keystroke to interact with the UI, and they all had "delay" after each one to permit the UI time to deal with it.

    I went a more clever way with repeat loops with 0.1 sec delays that wait for specific UI conditions. This minimizes the delay while ensuring that the UI has gotten to a state where it's ready for the next interaction from the script.

    I also added counters to these delay loops and set a condition that its waited too long if the counter gets above a certain number so that the script doesn't run away (infinite loop) if the UI condition never occurs.

    click a UI element or send keystrokes to the UI
    repeat until (some UI condition) or (waited too long)
    add 1 to wait counter
    delay 0.1
    end repeat
    if (waited too long) then
    display an alert
    return
    end if

    This model lets me do something with the UI, then wait for the next required state to be ready before doing the next interaction with the UI of the app. It minimizes the delay between steps, but ensures the UI is always ready for that next step before taking it.

    If one studies the UI element hierarchy of any app I believe this model would work for scripting it.

    1
  • Scott Ishiyama

    Hello, Walter.  What version of Capture One is required to run these scripts?  I'm on Capture One Pro 21.  I checked your YouTube video and buymeacoffee pages but didn't see it.  Thanks.

    0
  • Walter Rowe
    Moderator
    Top Commenter

    I think all versions from maybe CO 20 forward should be supported by the scripts since they don't do anything with specific tools that were added in later versions.

    0

Post is closed for comments.