🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8327

how do i write a text search-replace routine?

#8327
From: Ludwig_Gramberg
Date: Wed, 18 Oct 2006 07:27
17 lines
1674 bytes
Hi,

i'm a computer science student, a webdesigner and i've good coding skills especially in javascript but i can't get a simple task done here:

I want to write a routine to search and replace text. It should find any words -or part of words- which are written in capitals and give them -depending on the font used- opentype capitals or a fallback preference (like simulating capitals).

So here are some questions:

1. is there a similar -or any other- search-replace script?

2. using a selected Text seams to be the best starting point since the selection doesn't contain any hyphens as TextFrame's do. So How could i manage to get all Text selected which is within a Thread of TextFrames?

3. is there any information about the document object model especially it's hierarchy? what objects extends another etc.? It's quiet hard to guess the whole hiearchy. Also would the hierarchy help a lot to find the right place to start on.

I hope this task is manageble since finding all words which are written in capital-letters is quit a job for a whole book.

best regards, Ludwig
Technical Details
Message-ID: <3bc20122.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news2.volia.net!news.ecp.fr!news.stben.net!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,c66069b42277bf0e,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Ludwig_Gramberg@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: how do i write a text search-replace routine?
Message-ID: <3bc20122.-1@webcrossing.la2eafNXanI>
Date: Wed, 18 Oct 2006 00:27:26 -0700
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news2.volia.net!news.ecp.fr!news.stben.net!webcrossing