Launch application with choosen session

Discussion regarding all scripting related questions
Please DO NOT post to this thread anything that is not directly related to scripting of Capture One.

Launch application with choosen session

Postby NN635910551228826298UL » Tue Mar 28, 2017 12:57 pm

hello together

can anyone tell me how I can open Capture One and load a session by using AppleScript? In my opinion, it has to be written like that, but that only opens capture one with the last opened session.

tell application "Capture One 10"
set document to open document "TestSession"
end tell

the whole scenario: I want to open capture one with a specific session and after that, I want to rate my images relating to some xmp files I have from Lightroom.

Thanks for your help
Denis
NN635910551228826298UL
 
Posts: 1
Joined: Sun Feb 14, 2016 2:58 pm

Re: Launch application with choosen session

Postby Ernesto J. » Wed Mar 29, 2017 11:42 am

Open the cosessiondb file within the session folder. Example here is test1 session on my desktop.

Code: Select all
tell application "Capture One 10"
   set theDocFile to POSIX file "/Users/[username]/Desktop/test1/test1.cosessiondb"
   open theDocFile
end tell
Ernesto J.
 
Posts: 11
Joined: Mon Jul 11, 2016 4:28 pm

Re: Launch application with choosen session

Postby Ernesto J. » Wed Mar 29, 2017 11:58 am

Or just hold the Opt/Alt key on launch to suppress the last doc opening and get the chooser window.
Ernesto J.
 
Posts: 11
Joined: Mon Jul 11, 2016 4:28 pm

Re: Launch application with choosen session

Postby SeanMurp » Wed May 10, 2017 9:39 pm

Denis,
How is it you wanted to determine which session is to be opened? The suggested code will only open a single, pre-defined session. More easily would be to just double-click on the session's .cosessiondb file which will open that session directly. Guess I'm not understanding the need for a script to open a single session.

Now, if you were wanting to input a name into a dialog window and have CaptureOne open that specific session than the script is a bit more complicated but totally doable as long as you: 1. know the session name beforehand and 2. all of the sessions are in the same specified location. For example, all of my sessions are saved on my Backup drive and all sessions follow a specific naming structure (yy-mm-dd ModelName TimeOfDay Photographer). With this I could have a pop up a dialog window ask me to input the session name I'm looking for. It takes that and finds the specified session folder and opens the doc.

Let me know if that is more what you're looking to do or some more details if not.
SeanMurp
 
Posts: 43
Joined: Wed Nov 02, 2016 4:30 am


Return to Scripting



Who is online

Users browsing this forum: No registered users and 1 guest