Copy link to clipboard
Copied
Hi all.
I have a document with lots of tables, all of which have different amounts of columns.
I need to apply brackets around all of the text within a 'Notes' column, but this column does not feature in every table.
I was thinking that a script which selected any column containing the word 'Notes' and then ran a grep search on the selection (figures only) would be a quick way to achieve this.
For the grep search I was thinking that this would work:
app.findGrepPreferences=app.changeGrepPreferences=null;
app.findGrepPreferences.findWhat="\d+";
app.changeGrepPreferences.changeTo="($1)";
app.activeDocument.changeGrep();
but am struggling with the find/select element.
I'd be very grateful of any help.
Many thanks.
Copy link to clipboard
Copied
Try "(\\d+)"
-Manan
Copy link to clipboard
Copied
And in case you are using CC 2019: Update to 14.0.2 and do the manual Update
Copy link to clipboard
Copied
Sorry, to clarify, I need help with the portion of a script that can search for the word 'Note' in multiple tables and then select those columns, where I can then have the grep script run.
Many thanks
Copy link to clipboard
Copied
Here is how you would get a list of table columns with cells containing "Note" in AppleScript:'
tell application "Adobe InDesign CC 2019"
tell document 1
set myList to parent column of every cell of every table of every text frame where paragraph 1 of it contains "Note"
end tell
end tell
Find more inspiration, events, and resources on the new Adobe Community
Explore Now