Article View: adobe.scripting.indesign
Article #1398Re: [CS3 AS] New spread with 2 or more pages at front
From: Mike_Nieuwstraten
Date: Thu, 05 Feb 2009 21:52
Date: Thu, 05 Feb 2009 21:52
33 lines
1907 bytes
1907 bytes
Shane,
'make at end' didn't work either. The only way I got them in was to 'move to end of spread'.
To tackle all parameters I ended up with:
tell application "Adobe InDesign CS4"
tell document 1
tell document preferences
set preserve layout when shuffling to true --not shure if needed
set PagsInNieuweSpread to 1
if facing pages is true then set PagsInNieuweSpread to 2
end tell
set DeMasterNamen to name of every master spread
if (count of items of DeMasterNamen) is 1 then
set TeGebruikenMasterNaam to (item 1 of DeMasterNamen)
else
set TeGebruikenMasterNaam to item 1 of (choose from list DeMasterNamen with prompt "Welke master gebruiken?")
end if
set PagsPerMaster to (count pages of master spread TeGebruikenMasterNaam)
set NieuweSpread to (make spread at beginning with properties {applied master:master spread TeGebruikenMasterNaam})
if PagsPerMaster > PagsInNieuweSpread then
repeat (PagsPerMaster - PagsInNieuweSpread) times
set NieuwePag to (make page at end of NieuweSpread)
move NieuwePag to end of NieuweSpread --only way to get them in
end repeat
end if
end tell
end tell
OK, some dutch for the variables, but you get the idea...
Thanks for leading me to this final solution!
Michiel
Technical Details
Message-ID:
<59b7c1d9.3@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossingReferences:
<59b7c1d9.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,b454171fa4d41d9d X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Mike_Nieuwstraten@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: [CS3 AS] New spread with 2 or more pages at front Message-ID: <59b7c1d9.3@webcrossing.la2eafNXanI> Date: Thu, 5 Feb 2009 13:52:12 -0800 References: <59b7c1d9.-1@webcrossing.la2eafNXanI> Lines: 37 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit