🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14882

Re: JS beginners help

#14882
From: Roy_Marshall
Date: Thu, 15 Jan 2004 13:10
23 lines
1636 bytes
Dave, many many thanks again, I should've seen that one.

One more thing now.....

I dont know if you recall the help you gave me a while ago with AS, but I am basically changing this script into JS. I have to say that the script needed in JS is far less than AS. GREAT! What I need to be able to do is search for a character, do some checks on the parent paragraph/line, repeated for the count of results.
Here is a portion of the AS script that worked, If you or some other helpful bod could point me at an equivalent JS script I would be eternally greatful!.

try
		set mypound to search myselection for "�"
		repeat with n from (count of mypound) to 1 by -1
			set mypara to object reference of paragraph 1 of item n of mypound
			if the contents of mypara does not contain tab then
				set contents of insertion point 1 of line 1 of mypara to tab
			end if

		end repeat
	end try

Any help would be good.

Cheers

Roy
Technical Details
Message-ID: <2ccf45cf.19@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccf45cf.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,613db9f5b5ffc527
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-15 05:37:45 PST
From: Roy_Marshall@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: JS beginners help
Message-ID: <2ccf45cf.19@webx.la2eafNXanI>
Date: Thu, 15 Jan 2004 05:10:35 -0800
References: <2ccf45cf.-1@webx.la2eafNXanI>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit