Capture One - New Session

Hi sorry I’m quite new at scripting!

Im hoping to try to write a script to open a new session in Capture one and set the Folder name, path and capture name.

Could anyone help me out?

Thanks!

I had a look at Capture One recently on behalf of someone, and it didn’t offer much joy scripting-wise. It actually has quite a large scripting dictionary, but lots of it simply doesn’t work. I suspect it’s been carried over from a previous version, where it presumably once worked.

Sorry if that sounds discouraging…

Ah ok thanks for letting me know.

The scripting dictionary, is this an actual thing that I can look at to see terms? (Sorry Noob question I imagine :|)

Yes it is. Find (Apple)Script Editor in /Applications/Utilities. Then drag Capture One’s icon over its icon.

Capture One is rather idiosyncratic in a number of ways and not very intuitive ” that makes scripting it even more difficult.

Here’s something to get you started.


set sessionName to "My Session Name"
set sessionPath to "/Users/chris/Pictures/Project 1/"

tell application "Capture One"
	set newDoc to make new document with properties {name:sessionName, path:sessionPath}
end tell

tell application "System Events"
	tell application process "Capture One"
		set frontmost to true
	end tell
end tell

Here are a couple of test scripts I wrote a while back ” just to show some more features.


tell application "Capture One"
	set selectedVarient1 to (get parent image of (get item 1 of (get selected variants)))
	set photoFilePosix to (id of selectedVarient1)
	set photoFileName to name of selectedVarient1
end tell


tell application "Capture One"
	
	tell front document
		set _selects to selects
		set imgList to images
		set itm1 to item 1 of imgList
		set documentProperties to properties of itm1
		set item1Name to name of itm1
		set item1ID to id of itm1
	end tell
	
	set selectedVarient1 to (get parent image of (get item 1 of (get selected variants)))
	set _file to (id of selectedVarient1)
	set _name to name of selectedVarient1
	
end tell

Cool – you got further than I did.

This short course appears to be scheduled for today.

Although the section header on the page says Archiving2016/Short Courses, the Google calendar shows June 17, 2015.

In any case the fact they’re holding a 4 hour short course and the information on AppleScript hooks below suggest Capture One has more automation chops than meet the eye.

http://www.imaging.org/ist/conferences/archiving/short_courses.cfm

T3C: Automating Away Drudgery, AppleScript
Solutions in a Capture One Centric Workflow
1:30 “ 5:45 pm (4 hours)
Instructors: Jacob Frost, Phase One, and Doug Peterson, Digital Transitions

Many institutions have redundant or repetitive workflows that can be dramatically improved via Apple Scripting. (Note: AppleScript can only be run from a Mac, but can interface and work with files across PC/Mac mixed networks.) A good script saves time, reduces errors, and makes digitization less tedious.

AppleScript is a simple OSX scripting language. Capture One 8 CH introduces many AppleScript hooks, allowing automation and advanced workflows with minimal coding. This course is a practical workshop on using AppleScripting in a Capture One centric workflow, for example, this four line Self Timer script:


tell application "Capture One"
	delay 5
	capture
end tell

More advanced scripts can sync Capture One (C1) naming to a database, check C1 sessions for completeness, provide audio queues for capture, smooth out jittery C1 AutoCrop results, split pages within C, and more.

Benefits:

This course enables the attendee to:

¢ Distinguish between tasks well suited to scripting, and tasks better done with brute force.
¢ Understand what AppleScripts can and cannot do easily.
¢ Construct complete AppleScript solutions in a Capture One centric workflow.
¢ Properly comment and document your AppleScript solutions, and troubleshoot problematic code.
¢ Identify resources and contacts to help improve your Capture One AppleScript solutions.

Ah well that sounds amazing. I just flicked through the calendar and its actually in April, however its in Washington DC so not sure I’ll be able to travel that far. But thanks, I’ll try look for a UK equivalent!

As for the script you kindly provided the “new document” bit seems to causing issues, I tried switching it to “new session” and then it tells me the session can not be a “type type”.

Any ideas?

“Causing issues” doesn’t tell me anything. What kind of issues?

Sorry I got it to work, I’d just formatted my path wrongly. Thank you so much!

While i’ve got your brains here… any ideas on how to change the Capture Name to one of the Built In Presets?

Hey There,

Not really, and my demo period for Capture One is over ” so I can’t test.

I’d go ask on Capture One’s support boards.

I may have answered this already for you on the phase one forum


tell application "Capture One"
	set capture name of first item of documents to "this_1"
	set capture name format of first item of documents to "Name/-/4 Digit Counter"
	get capture name format of first item of documents
	
end tell