FindChangeByList GREP UniCode?

215 views
Skip to first unread message

Brad Walrod

unread,
Jul 29, 2011, 3:44:46 PM7/29/11
to indesi...@googlegroups.com
I'm trying to use FindChangeByList (AppleScript) to clean up a generated TOC. I'd like to strip some returns and insert en-spaced bullets.

In ID, \x{2002} works in the GREP search field but I can't seem to use that for a replacement in the FindChangeList file of translations using GREP mode. Is there any way to insert UniCode values in this file?

I didn't have much luck with searching for digits using \d+ but I eventually discovered that sets (I think they're called) work fine: {find what:"^([0-9]+)\r"} which finds all my chapter numbers on lines by themselves.

Thanks in advance.

Brad

Rick Gordon

unread,
Jul 29, 2011, 3:56:16 PM7/29/11
to indesi...@googlegroups.com
Are you escaping your backslashes in the AppleScript? You would need to insert \\ to mean \

Rick Gordon

------------------

On 7/29/11 at 3:44 PM -0400, Brad Walrod wrote in a message entitled
"[ID] FindChangeByList GREP UniCode?":

--
___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

WWW: http://www.shelterpub.com

Brad Walrod

unread,
Jul 29, 2011, 4:18:04 PM7/29/11
to indesi...@googlegroups.com
This is in the FindChangeList.txt file. I'm not touching the actual script (if I can help it; I have read through it, tho).

I figured \d and \x wouldn't need escaping because \r didn't, nor \t (as shown in the examples). Hell, I almost didn't try it before sending off a quick reply, I was so sure of myself. ;-)

Thanks a lot. Now I can change this:

Chapter
22
Blah blah

to this:

Chapter 22 • Blah blah

via this:

{find what:"^(Chapter)\r(\\d+)\r"}
{change to:"$1 $2\\x{2002}\\x{2022}\\x{2002}"}

I've always been annoyed that I haven't been able to combine lines when generating a TOC. This will do the trick nicely.

Brad

> --
> you are subscribed to "InDesign talk" on Google Groups, to post: send email to indesi...@googlegroups.com, to unsubscribe: send email to indesign-tal...@googlegroups.com, for more options visit http://groups.google.com/group/indesign-talk
>

Reply all
Reply to author
Forward
0 new messages