Recipe scripting
I need some help regarding this script. I use it to reset the process recipes however on reopening capture one, it puts a load of default recipes back in the mix. There is obviously something i am missing. I presume there is a better way rather than deleting all and recreating.... any ideas greatly appreciated
This script
-Deletes all recipes
-makes new blank ones
-disables them all
-sets the parameters for each
global respectCrop, ignoreCrop, senDing
set respectCrop to 0 as integer
set ignoreCrop to 1 as integer
set croptoPath to "crop to path"
set senDing to "Macintosh HD:users:02_sending"
-- repeat 5 times
-- make recipe at document 1
--end repeat
clearAll()
makeAll()
disableAll()
recipe1()
recipe2()
recipe3()
recipe4()
recipe5()
recipe6()
recipe7()
on makeAll()
try
tell application "Capture One 11"
tell current document
repeat 6 times
make recipe
end repeat
end tell
end tell
end try
end makeAll
on clearAll()
try
tell application "Capture One 11"
tell current document
delete recipes
end tell
end tell
end try
end clearAll
on disableAll()
tell application "Capture One 11"
tell current document
tell recipes
set enabled to false
end tell
end tell
end tell
end disableAll
on recipe1()
tell application "Capture One 11"
tell current document
set output name format to "[Image Name][Sub Name]"
set output counter to 1
set output sub path to ""
tell recipe 1
set enabled to true
set name to "psd_adobe_8bit"
set output format to PSD
set bits to 8
set pixels per inch to 300
set scaling method to Fixed
set scaling unit to Percent
set ignore crop to true
set color profile to "Adobe RGB (1998)"
set output sub name to "_v1"
set output sub folder to ""
set root folder type to output location
end tell
end tell
end tell
end recipe1
on recipe2()
tell application "Capture One 11"
tell current document
set output name format to "[Image Name][Sub Name]"
tell recipe 2
set root folder type to custom location
set root folder location to senDing
set name to "jpgs_preview_72ppi_2000px"
set output format to JPEG
set JPEG quality to 80
set pixels per inch to 72
set scaling method to Long_Edge
set scaling unit to Pixels
set primary scaling value to 2000
set sharpening to no output sharpening
set color profile to "Adobe RGB (1998)"
set output sub name to "_prw"
end tell
end tell
end tell
end recipe2
on recipe3()
tell application "Capture One 11"
tell current document
set output name format to "[Image Name][Sub Name]"
tell recipe 3
set name to "jpgs_lr_web_72ppi_2500px"
set output format to JPEG
set JPEG quality to 80
set pixels per inch to 72
set scaling method to Long_Edge
set scaling unit to Pixels
set primary scaling value to 2500
set sharpening to no output sharpening
set color profile to "sRGB Color Space Profile"
set output sub name to "_lr"
set root folder type to custom location
set root folder location to senDing
end tell
end tell
end tell
end recipe3
on recipe4()
tell application "Capture One 11"
tell current document
set output name format to "[Image Name][Sub Name]"
tell recipe 4
set name to "jpgs_hr_300ppi_30cm"
set output format to JPEG
set JPEG quality to 80
set pixels per inch to 300
set scaling method to Long_Edge
set scaling unit to centimeters
set primary scaling value to 30
set sharpening to no output sharpening
set color profile to "Adobe RGB (1998)"
set output sub name to "_hr"
set root folder type to custom location
set root folder location to senDing
end tell
end tell
end tell
end recipe4
on recipe5()
tell application "Capture One 11"
tell current document
set output name format to "[Image Name][Sub Name]"
tell recipe 5
set name to "tiffs_rgb_300ppi_30cm"
set output format to TIFF
set bits to 8
set pixels per inch to 300
set scaling method to Long_Edge
set scaling unit to centimeters
set primary scaling value to 30
set sharpening to no output sharpening
set color profile to "Adobe RGB (1998)"
set output sub name to "_rgb"
set root folder type to custom location
set root folder location to senDing
end tell
end tell
end tell
end recipe5
on recipe6()
tell application "Capture One 11"
tell current document
set output name format to "[Image Name][Sub Name]"
tell recipe 6
set name to "tiffs_fl_300ppi_30cm"
set output format to TIFF
set bits to 8
set pixels per inch to 300
set scaling method to Fixed
set primary scaling value to 100
set sharpening to no output sharpening
set color profile to "Adobe RGB (1998)"
set output sub name to "_rgb_fl"
set root folder type to custom location
set root folder location to senDing
end tell
end tell
end tell
end recipe6
on recipe7()
tell application "Capture One 11"
tell current document
set output name format to "[Image Name][Sub Name]"
tell recipe 7
set name to "jpgs_crop-dimensions"
set output format to JPEG
set pixels per inch to 72
set scaling method to BoundingDimensions
set scaling unit to Pixels
set primary scaling value to 200
set secondary scaling value to 200
set ignore crop to false
set JPEG quality to 80
set color profile to "sRGB Color Space Profile"
set sharpening to no output sharpening
set output sub name to "[Instructions]x[Provider]_"
set output sub folder to "HOMEPAGE"
set root folder type to output location
end tell
end tell
end tell
end recipe7
-
What you have here is a debugging problem. I suggest you install a copy of Script Debugger (you can get a free trial version, although its well worth the money) load your script, set debugging on, and step through your script. You can watch the recipeds appera and disappear using the explorer window. You will easily be able to see when and where it goes wrong.
0 -
Thanks Eric,
I found the bug,
recipes persist throughout documents, so in order to avoid them popping up again you have to clear them from all documents. Obviously capture one needs at least one recipe so i came up with this, to clear recipes before creating new one and seems to have done the trick:
tell application "Capture One 21"
try
set recipeNo to count recipes of documents of application "Capture One 21"
set deleteNo to recipeNo - 1
if recipeNo is greater than 1 then
repeat deleteNo times
delete recipe 2 of documents of application "Capture One 21"
end repeat
end if
end try
end tell
0
投稿コメントは受け付けていません。
コメント
2件のコメント