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

Script to click into the Next Capture Naming text box

Comments

6 comments

  • Emory Dunn

    Might I offer an alternative to UI scripting? If you use a script to pop up a dialogue box where you can enter a new name you won't have to worry about the state of Capture One's UI. 

    This script opens a dialogue and will set the capture name to the entered text when you hit return, or will leave the name be on escape. 

    try

    set theResponse to display dialog ¬

    "New Name" default answer ¬

    "" buttons {"Cancel", "Done"} ¬

    default button ¬

    "Done" cancel button "Cancel"

     

    tell front document of application "Capture One 23"

    set capture name to text returned of theResponse

    end tell

    end try

     

    1
  • David Knox

    Yes, I understand exactly what you are recommending and that would work perfectly. I don't need to muck around with the UI but can create my own dialogue box to control the naming.  Just not sure how to convert what you have sent into usable script. 

    I'm hammering on it. 

    Thank you 

    0
  • Rick Allen

    try

    set theResponse to display dialog "New Name" default answer "" buttons {"Cancel", "Done"} default button "Done" cancel button "Cancel"

    tell front document of application "Capture One 23"

    set capture name to text returned of theResponse

     

    end tell

     

    end try

    1
  • David Knox

    That's it! Worked perfectly. Thank you both for your help. If you are ever in LA, I owe y'all a beer. 

    0
  • Emory Dunn

    Thanks for removing the extra newlines, Rick. Wish the forum actually pasted text as-is into the code block. 

    0
  • Rick Allen

    You may also want to set the name format at the same time, in case someone has set it to one of the other available tokens. In the below example I've added an underscore and 4-digit counter.

     

    try

    set theResponse to display dialog "New Name" default answer "" buttons {"Cancel", "Done"} default button "Done" cancel button "Cancel"

    tell front document of application "Capture One 23"

    --set capture name to text returned of theResponse

    set {capture name, capture name format} to {text returned of theResponse, "[Name]_[4 Digit Counter]"}

    end tell

     

    end try

    1

Please sign in to leave a comment.