Hi All…
I am converting a script that I have that puts a directory together from InDesign CS to InDesign CS2, and am getting a goofy error when I’m trying to make a paragraph style:
“Adobe InDesign CS2 got an error: The requested font style is not available.”
I am including my script…I only get the error when I try to make the SECOND paragraph style (TaglineQuote)
The font is active and turned on (this scripted worked perfectly in InDesign CS just yesterday!)
--chooses project's template file
set fileToOpen to (choose file with prompt "Please select file to open:")
display dialog "Give me the first page of locators:" default answer ""
set startPage to (text returned of result) as integer
if startPage mod 2 = 0 then
set myPageSide to "Left"
--set tagLinePage to startPage
else if startPage mod 2 = 1 then
set myPageSide to "Right"
--set tagLinePage to startPage - 1
end if
--this creates InDesign document
tell application "Adobe InDesign CS2"
--makes new document, but does not show it, to keep speed up
--if myPage = 1 then
--sets margin preferences
set myMarginPrefs to margin preferences
tell myMarginPrefs
set bottom to 0
set top to 0
set left to 0
set right to 0
end tell
set myDocument to open fileToOpen --without showing window
--set myDocument to make document --without showing window
tell my myDocument
(*
--sets page preferences
set myDocPrefs to document preferences
tell myDocPrefs
set pages per document to 3
set facing pages to true
set page height to "8.25 in"
set page width to "6.5 in"
set page orientation to portrait
end tell
*)
set myMaster to object reference of master spread "A-Master"
set myViewPrefs to view preferences
tell myViewPrefs
set ruler origin to page origin
end tell
set mySpread to spread 2 of myDocument
tell mySpread
set keep together to true
end tell
--this deletes page 1 of InDesign document (right facing/odd page) if the first page of locators begins on a left facing/even page
if myPageSide = "Left" then
delete page 1 of myDocument
end if
--makes new colorr swatches for the document
if exists color "PANTONE 532 U" then
set myBonusGrey to color "PANTONE 532 U"
else
set myBonusGrey to make color with properties {model:process, space:CMYK, color value:{100, 80, 70, 25}, name:"Bonus_Grey"}
end if
set myBonusBlue to make color with properties {model:process, space:CMYK, color value:{100, 57, 0, 0}, name:"Bonus_Blue"}
set myBonusWhite to make color with properties {model:process, space:CMYK, color value:{0, 0, 0, 0}, name:"White"}
--makes paragraph styles
set pageNumberPara to make paragraph style with properties ¬
{name:"Page Number", applied font:"Trebuchet MS", font style:"Regular", point size:14, justification:center align, fill color:myBonusWhite, baseline shift:-2}
set taglineQuote to make paragraph style with properties ¬
{name:"Tagline_Quote", applied font:"CustomerTypeRegular", font style:"Bold", point size:14, tracking:20, justification:left align, fill color:myBonusWhite}
set taglineBonus to make paragraph style with properties ¬
{name:"Tagline_Bonus", applied font:"Customer Type", font style:"Regular", point size:14.5, justification:right align, fill color:myBonusWhite}
set headerStateName to make paragraph style with properties ¬
{name:"Header_StateName", applied font:"CustomerTypeRegular", font style:"Bold", point size:15, justification:left align, fill color:myBonusWhite}
set headerStateNameCont to make paragraph style with properties ¬
{name:"Header_StateName (cont)", based on:headerStateName, point size:12}
set headerStateFact to make paragraph style with properties ¬
{name:"Header_StateFacts", applied font:"Customer Type", font style:"Regular", point size:9, justification:left align}
set dealerCityPara to make paragraph style with properties ¬
{name:"Dealer City", applied font:"CustomerTypeRegular", font style:"Bold", point size:12, justification:center align, fill color:myBonusBlue, fill tint:55}
set dealerInfoPara to make paragraph style with properties ¬
{name:"Dealer Information", applied font:"Customer Type", font style:"Regular", point size:9.5, justification:left align, left indent:0.125, first line indent:-0.125}
set dealerPhoneOtherPara to make paragraph style with properties ¬
{name:"Dealer PhoneOther", based on:dealerInfoPara, left indent:0, first line indent:0}
tell dealerPhoneOtherPara
set myTabDealerInfo to make tab stop
tell myTabDealerInfo
set position to 1.625
set alignment to right align
set leader to ""
end tell
end tell
set dealerPhonePrimPara to make paragraph style with properties ¬
{name:"Dealer PhonePrimary", applied font:"CustomerTypeRegular", font style:"Bold", point size:12, justification:right align, fill color:myBonusBlue, fill tint:55}
set dealerWebPara to make paragraph style with properties ¬
{name:"Dealer Web", based on:dealerInfoPara, applied font:"Customer Type Condensed", font style:"Regular"}
set dealerNamePara to make paragraph style with properties ¬
{name:"Dealer Name", applied font:"Customer Type", font style:"Regular", point size:12, justification:left align, rule below:true, rule below line weight:1, rule below offset:0.05, rule below color:myBonusBlue, rule below tint:55, rule below width:column width} --rule below type:solid,
--added to incorporate GPS coordinates
set gpsLatLongPara to make paragraph style with properties ¬
{name:"LatLong Type", applied font:"CustomerTypeCondensedRegular", font style:"Bold", point size:9.5, justification:left align, fill color:myBonusBlue}
tell gpsLatLongPara
set myTabLatLong to make tab stop
tell myTabLatLong
set position to 1.5
set alignment to right align
set leader to ""
end tell
end tell
--end added GPS info
--makes new layers, with names and colors. new layers go on top, so list from bottom up
set imageLayer to make layer with properties {name:"Images", layer color:cyan}
set bleedLayer to make layer with properties {name:"Bleed Bars", layer color:yellow}
set trapLayer to make layer with properties {name:"Trap", layer color:white}
set trapBkOtLayer to make layer with properties {name:"Trap B/O", layer color:white}
set headerLayer to make layer with properties {name:"State Headers", layer color:magenta}
set pageText to make layer with properties {name:"Page Text", layer color:brick red}
set locatorLayer to make layer with properties {name:"Locators", layer color:orange}
set dealerText to make layer with properties {name:"Dealer Text", layer color:light blue}
move layer "tire fade new" to after layer "Page Text"
--deletes default layer
if exists layer "Layer 1" then
delete layer "Layer 1"
end if
end tell
end tell
help!!!
thanks
xcheckr