Copy link to clipboard
Copied
I am new to indesign scripting. I am trying to learn with the "Adobe Introduction to Scripting" but so far its just given me a headache.
I have written a few basic scripts but need to study harder!
I would like to write a script for a grep search (find/change returns change them into soft returns (\r - \n)) that only searches in (multiple) tables i.e. ignores/doesn't change returns in the text.
I would really appreciate someone putting me in the right direction.
Dave
Copy link to clipboard
Copied
p.s. I am working with CS3
Copy link to clipboard
Copied
what about looping through all texts, then loop through it's tables, and search the table.
var YourTable = app.activeDocument.texts.tables
instead of
app.findGrepPreferences.findWhat ="\n";
then look for
YourTable.findGrepPreferences.findWhat ="\n";
Copy link to clipboard
Copied
Hi Dave,
I am also new for scripting. Indesign sample scripts will help you with your GREP needs. Findchangebylist.jsx did what you want. Just open your indesign folder from hard disk go to script folder, choose javascript open Findchangebylist.jsx. It support eith a txt file. read the file carefully, it will solve your headache. Dont forget script will ignore the slashes, for example you grep code is \s means you need to use \\s in script.(that means double slashes)
karthi
Copy link to clipboard
Copied
there is a way to use one of the scripts (the findchangebylist.jsx one) to make chained queries almost like macros in word.
have a read of this thread on indesignsecrets.com:
http://indesignsecrets.com/forum/general-indesign-topics/macroscript-for-multiple-text-find-change-queries
otherwise check out Kasyan Servetsky's find/change by queries:
http://kasyan.ho.com.ua/find_change_by_queries.html
or this effort from automatication
http://www.automatication.com/index.php?id=12