I have a script that makes a bunch of different Indesign docs based off some user inputs. I was wondering if there is a way to shorten some of the same fuctions. Each doc is the same size (8.5 X 11) the only things that will change are the point size, fill color, applied font, geometric bounds and the save name.
any ideas this script is huge…
tell application "Adobe InDesign CS2"
activate
set FormDoc to make document
tell document preferences of FormDoc
set page width to "8.5 in"
set page height to "11 in"
end tell
tell FormDoc
try
set LayerName to layer "Image layer" of FormDoc
on error
set LayerName to make layer with properties {visible:true, locked:false, name:"GAME ID"}
delete layer 2
end try
delete color "C=100 M=0 Y=0 K=0"
delete color "C=0 M=0 Y=100 K=0"
delete color "C=0 M=100 Y=0 K=0"
delete color "C=15 M=100 Y=100 K=0"
delete color "C=75 M=5 Y=100 K=0"
delete color "C=100 M=90 Y=10 K=0"
set the_frame to make text frame
set the geometric bounds of the_frame to {"10.7861 in", "0 in", "11 in", "4.4972 in"}
set contents of the_frame to gamename & " " & (do shell script "date +%m/%y")
set vertical justification of text frame preferences to bottom align
set justification of characters of the_frame to left align
set applied font of characters of the_frame to "Helvetica (TT)"
set font style of characters of the_frame to "Bold"
set point size of characters of the_frame to 16
set fill color of characters of the_frame to "Registration"
set overprint fill of characters of the_frame to true
set vertical justification of text frame preferences of the_frame to bottom align
set capitalization of characters of the_frame to all caps
set save_name to "GAME ID" as string
set dest_path to gamefolder as string
set FileName to dest_path & save_name
save to FileName
end tell
close active document
end tell
Thanks