🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #518

Re: Applescript or Javascript?

#518
From: Eric
Date: Thu, 12 Mar 2009 18:01
15 lines
1517 bytes
I tend to stick with Applescript simply because I always find the syntax of Javascript pretty daunting by comparison. It can make revisiting a script you haven't had to edit in a year or two somewhat easier. (Provided you name your variables and comment well, of course.)

e.g. it is pretty simple to just read what is going on in stuff like this:

set pStylesList to every paragraph style whose name does not contain "[" 
repeat with thisStyle in pStylesList 
	--Append "-old" to all current para styles except default 
	set name of thisStyle to name of thisStyle & "-old" 
end repeat



Which is certainly not to say there's not more power locked in Javascript. There are a lot of rudimentary things, such as sorting that aren't part of the basic AS syntax, alas...

And a way to set a variable quicker would be nice! x := 0 like Pascal has, for "power" users or something.
Technical Details
Message-ID: <59b82d8a.4@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2.glorb.com!newsfeed.news2me.com!newshub.sdsu.edu!webcrossing
References: <59b82d8a.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,a6265083bc2d8c51
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Eric_@_MCA@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2.glorb.com!newsfeed.news2me.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Applescript or Javascript?
Message-ID: <59b82d8a.4@webcrossing.la2eafNXanI>
Date: Thu, 12 Mar 2009 11:01:24 -0700
References: <59b82d8a.-1@webcrossing.la2eafNXanI>
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit