Next capture settings to apply styles in Applescript
Alright folks, so here I'm trying with a simple script, in a tethered session, to ready the next capture settings.
I can't figure out a way to get the (next capture settings apply styles) to work!
How to get ( Styles Library > User Styles > "nameofstyle" )
https://i.imgur.com/TQpQFPR.png
applied to next capture? has anyone tried this yet?
Here is how my code looks like
The next capture name works fine, the capture counter as well. Only the part
Not approaching it the right way.
Any help is much appreciated.
Thanks
Mahmoud
I can't figure out a way to get the (next capture settings apply styles) to work!
How to get ( Styles Library > User Styles > "nameofstyle" )
https://i.imgur.com/TQpQFPR.png
applied to next capture? has anyone tried this yet?
Here is how my code looks like
tell application "Capture One 10"
set popup to (display dialog "Scan Tag" default answer "" buttons {"pr1", "pr2", "pr3"} default button 1)
set scanResult to text returned of popup
set P to button returned of popup
tell document 1
set capture name to scanResult
set capture counter to 0
if P = "pr2" then
set apply styles of next capture settings to "nameofstyle2"
else if P = "pr3" then
set apply styles of next capture settings to "nameofstyle3"
end if
display notification scanResult & " is active now! " with title "Scan Complete"
end tell
end tell
The next capture name works fine, the capture counter as well. Only the part
set apply styles of next capture settings to "nameofstyle2"
Not approaching it the right way.
Any help is much appreciated.
Thanks
Mahmoud
0
-
Okay, I found what I was doing wrong here. Solved.
I had to have a "tell" for next capture settings of document 1, then set the settings in text.
like this:tell document 1
set capture name to scanResult
set capture counter to 0
end tell
if P = "pr2" then
tell next capture settings of document 1
set apply styles to {"nameofstyle1"}
end tell
else if P = "pr3" then
tell next capture settings of document 1
set apply styles to {"nameofstyle2"}
end tell
-- display dialog "You Picked pr2 " & scanResult default button 1
end if
Hope this information is helpful to somebody, as I find this forum a great source of knowledge.
Cheers.0
Post is closed for comments.
Comments
1 comment