get tool name or id
Hey guys
I'm doing some fairly complex adjustments to files and have noticed that if the tools that I'm adjust are visible the script take substantially longer to run than if not expanded. I noticed in the dictionary for CO12 you can set the tool to expanded or not but for the life of me I cant work out how to reference.
Initially I was thinking making the window invisible would help but not much.
I'm doing some fairly complex adjustments to files and have noticed that if the tools that I'm adjust are visible the script take substantially longer to run than if not expanded. I noticed in the dictionary for CO12 you can set the tool to expanded or not but for the life of me I cant work out how to reference.
Initially I was thinking making the window invisible would help but not much.
tell application "Capture One 12"
set theid to get id of window 1
set visible of window id theid to 0
--do stuff
set visible of window id theid to 1
end tell
0
-
You could try just collapsing them all like so:
tell front document of application "Capture One 12.0"
set expanded of tools of tool tabs to false
end tell
and then expanding them all again at the end. Or, if you need to restore the state, loop through each tool, store its expanded state and ID, collapse them, then loop through again and loop up the previous state.0 -
Here a bit of code that just collapses the tools on th selected tooltab, and remebers the state of each tool, so that after the script actions are done, each tool can be reset to its previous state.
tell front document of application "Capture One 12"
--tell (tool tab whose selected is true) -- Fails
set {ttRefList, ttSelectedList} to get {it, selected} of every tool tab
set ttRefCollapsed to null
repeat with ttCtr from 1 to count of ttSelectedList
if ttSelectedList's item ttCtr then
set ttRefCollapsed to {(ttRefList's item ttCtr), every tool, every tool's expanded}
set ttRefList's item ttCtr's tool's expanded to false
exit repeat
end if
end repeat
end tell
The Applescript commands tell tool tab whose selected is true and get tool tab whose selected is true should work but don't.
It looks like Phase One has not implemented Range Filtering for Tool Tabs, although the Capture One Applescript dictionary says that it should work.0
Post is closed for comments.
Comments
2 comments