Skip to main content
Participant
Jan 3, 2018 4:53 PM UTC
Answered

FindChangeByList - need help with my FindChangeList.txt file

Hi,

I seem to be having trouble putting together the correct command in FindChangeList for an appropriate find/replace using FindChangeByList on InDesign CC 2018. I'm taking a list of price codes which I need to convert to a different set of codes given to me in a separate spreadsheet, which I've been able to convert into the following (there are actually several thousand replacements so I've just taken the top couple as an example).

text {find what:"DPGBP1323"} {change to:"DPEUR1588"} {include footnotes:true, include master pages:true, include hidden layers:false, whole word:false} Replace DPGBP code with DPEUR code.

text {find what:"DPGBP3598"} {change to:"DPEUR4318"} {include footnotes:true, include master pages:true, include hidden layers:false, whole word:false} Replace DPGBP code with DPEUR code.

text {find what:"DPGBP1295"} {change to:"DPEUR1554"} {include footnotes:true, include master pages:true, include hidden layers:false, whole word:false} Replace DPGBP code with DPEUR code

text {find what:"DPGBP4193"} {change to:"DPEUR5032"} {include footnotes:true, include master pages:true, include hidden layers:false, whole word:false} Replace DPGBP code with DPEUR code

text {find what:"DPGBP2601"} {change to:"DPEUR3121"} {include footnotes:true, include master pages:true, include hidden layers:false, whole word:false} Replace DPGBP code with DPEUR code

text {find what:"DPGBP1225"} {change to:"DPEUR1470"} {include footnotes:true, include master pages:true, include hidden layers:false, whole word:false} Replace DPGBP code with DPEUR code

text {find what:"DPGBP4274"} {change to:"DPEUR5128"} {include footnotes:true, include master pages:true, include hidden layers:false, whole word:false} Replace DPGBP code with DPEUR code

When running this through the AppleScript version of the script, I am given no message but no replacement seems to take place.  The Javascript version gives me "Error Number: 25 - Error String: Expected: :" on Line 160 of the actual script file (which I have not edited).

Huge thanks to anyone who can help out!

This topic is closed to new replies. Start a new post to keep the conversation going.
Kasyan Servetsky
Kasyan ServetskyCorrect answer
Legend
Jan 3, 2018 9:48 PM UTC

I don't have a Mac at hand so can't test it. I remember I had a problem with the AppleScript version a few years ago: in CS? — don't remember the exact version.

I recommend you to use the JS version together with Record Find Change script written by Martin Fisher. It writes the current find/change preferences (both text and GREP) to a text file so that you can copy and /paste them into a find-change list file.

— Kas

6 replies

Kasyan Servetsky
Kasyan ServetskyCorrect answer
Legend
Jan 3, 2018 9:48 PM UTC

I don't have a Mac at hand so can't test it. I remember I had a problem with the AppleScript version a few years ago: in CS? — don't remember the exact version.

I recommend you to use the JS version together with Record Find Change script written by Martin Fisher. It writes the current find/change preferences (both text and GREP) to a text file so that you can copy and /paste them into a find-change list file.

— Kas

Translate
vyabsleyAuthor
Participant
Jan 4, 2018 9:01 AM UTC

Thanks for this Kasyan, although unfortunately I'm now getting a different Javascript error:

Error Number: 17

Error String: Variable name expected

Engine: main

File: /Applications/Adobe InDesign CC 2018/Scripts/Scripts Panel/Samples/JavaScript/FindChangeByList.jsx

Line: 160

Source: app.doScript(myString, ScriptLanguage.javascript);

Translate
vyabsleyAuthor
Participant
Jan 4, 2018 9:06 AM UTC

Sorry, quick update to Kasyan's reply - that script got me 99% of the way there! It added an extra couple of commas at the start which, when deleted, seemed to work. Many thanks for your answer!

Translate
Community Expert
Jan 3, 2018 6:26 PM UTC
JR Boulay
Community Expert
Community Expert
Jan 3, 2018 5:21 PM UTC

Hi.

You should remove white spaces after words "include" and "whole" and and use the camelCaseSyntax which is mandatory like this:

text {find what:"DPGBP1323"} {change to:"DPEUR1588"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

Translate
Acrobate du PDF, InDesigner et Photoshopographe
vyabsleyAuthor
Participant
Jan 4, 2018 9:02 AM UTC

Thanks JR, although unfortunately there's no luck there after changing it. I remember seeing it like that on an earlier version of CC, but the samples in the current version include the spaces between the words and not in CamelCase.

Translate