🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1027

Help with syntax: Adding pages JS CS3

#1027
From: Tim_Judy
Date: Fri, 20 Feb 2009 15:52
16 lines
1339 bytes
I'm fairly new to scripting and I'm trying to write a script to add pages, inserting one after each existing page. We're doing postcards using a 4-up data merge. On the back of each card is the data merge/address (again, 4 to a page). Since the merge doesn't work on alternating pages, we want to do the merge first, then add the face pages afterward.
This is my code thus far:

var myPages = app.activeDocument.pages;
var myCounter = myPages.length-1;

for (i = myCounter; i >= 0; i--){

	myPages.add(LocationOptions.AFTER)...;

	}

On the line "myPages.add(LocationOptions.AFTER)..." I have tried every combination I can think of based on the CS3 Object Model that comes with Extend Script. Every one except the right one.

Many thanks for you help.
-Tim
Technical Details
Message-ID: <59b7feca.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,820d8b9639e366ce,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Tim_Judy@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Help with syntax: Adding pages JS CS3
Message-ID: <59b7feca.-1@webcrossing.la2eafNXanI>
Date: Fri, 20 Feb 2009 07:52:43 -0800
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit