🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #451

Re: Need help to debug simple javascript in CS3

#451
From: Robert Tkaczyk
Date: Fri, 20 Mar 2009 21:26
25 lines
1340 bytes
you need to decrease "i" and "j"

"i--" and "j--"


for (var=startvalue;var<=endvalue;var=var+increment) 
{
    code to be executed
}

so:

--------------------------------------------------------------------------

var myDoc = app.activeDocument;

for(i = myDoc.stories.length - 1; i >= 0; i--)
for(j = myDoc.stories[i].tables.length - 1; j >= 0; j--) { var myTable = myDoc.stories[i].tables[j]; myTable.convertToText( ",", "|"); }

--------------------------------------------------------------------------

robin

-- 
www.adobescripts.com
Technical Details
Message-ID: <CEEBD5ECC45E13B0D5174E39CC81C0C4@in.webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
References: <59b85ced.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,ec8d471341cee86
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Robert Tkaczyk <indesignscripts@wp.pl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Need help to debug simple javascript in CS3
Message-ID: <CEEBD5ECC45E13B0D5174E39CC81C0C4@in.webcrossing.la2eafNXanI>
Date: Fri, 20 Mar 2009 14:26:00 -0700
References: <59b85ced.-1@webcrossing.la2eafNXanI>
Lines: 28
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
X-Antivirus: avast! (VPS 090319-0, 2009-03-19), Outbound message
X-Antivirus-Status: Clean
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit