Skip to main content
Participant
January 3, 2018
解決済み

FindChangeByList - need help with my FindChangeList.txt file

  • January 3, 2018
  • 返信数 3.
  • 3092 ビュー

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!

このトピックへの返信は締め切られました。
解決に役立った回答 Kasyan Servetsky

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

返信数 3

Kasyan Servetsky
Legend
January 3, 2018

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

vyabsley作成者
Participant
January 4, 2018

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);

vyabsley作成者
Participant
January 4, 2018

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!

Community Expert
January 3, 2018
JR Boulay
Community Expert
Community Expert
January 3, 2018

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}

Acrobate du PDF, InDesigner et Photoshopographe
vyabsley作成者
Participant
January 4, 2018

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.