Copy link to clipboard
Copied
I'm running a duplicate of the FindChangeByList.applescript using newly generated text query from the RecordFindChange_CS3-CS5 script. but I keep getting this error:
Error String: adobe indesign 2021 got an error: expected "'" or "}" but found "."
Here is my txt document:
--FindChangeList.txt --A support file for the InDesign AppleScript FindChangeDirectory.applescript -- --This data file is tab-delimited, with carriage returns separating records. -- --The format of each record in the file is: --findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description -- --Where: --<tab> is a tab character --findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use). --findProperties is a properties record (as text) of the find preferences. --changeProperties is a properties record (as text) of the change preferences. --findChangeOptions is a properties record (as text) of the find/change options. --description is a description of the find/change operation -- --Very simple example: --text {find what:"--"} {change to:"^_"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find all double dashes and replace with an em dash. -- --More complex example: --text {find what:"^9^9.^9^9"} {applied character style:"price"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find $10.00 to $99.99 and apply the character style "price". -- --All InDesign search metacharacters are allowed in the "find what" and "change to" properties. --
text {, findWhat:"Welldynerx, Llc"} {, changeTo:"Welldynerx, Llc -"} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false, searchBackwards:false} //Comment text {, findWhat:"Welldynerx-Fl"} {, changeTo:"Welldynerx-Fl -"} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false, searchBackwards:false} //Comment
Copy link to clipboard
Copied
I updated my custom querries but the second one isn't working ("Welldynerx, Llc"):
text {find what:"Welldynerx-Fl"} {change to:"Welldynerx-Fl -"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find all space-dash-space and replace with an en dash.
text {find what:"Welldynerx, Llc"} {change to:"Welldynerx, Llc -"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find all space-dash-space and replace with an en dash.
Does this have to do with the comma?
Copy link to clipboard
Copied
Try the following
text {findWhat:"Welldynerx, Llc"} {changeTo:"Welldynerx, Llc -"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
Notice that I changed the keys like find what to findWhat etc, they have to be written in the same format as I have and also shown in the sample entries in the findChangeList.txt file. Another thing to note is that the space in the string before { and after } has to be a tab character
-Manan
Copy link to clipboard
Copied
Thank you for your help but I don't think there was anything wrong with my formatting.
Here is the updated code I have (LLC works but FL does not now):
text {find what:"Welldynerx, Llc"} {change to:"Welldynerx, Llc -"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Add mailbox after Welldynerx, Llc.
text {find what:"Welldynerx-Fl"} {change to:"Welldynerx-Fl -"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Add mailbox after Welldynerx-Fl.
If I flip the two strings of code, FL works but LLC does not:
text {find what:"Welldynerx-Fl"} {change to:"Welldynerx-Fl -"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Add mailbox after Welldynerx, Llc.
text {find what:"Welldynerx, Llc"} {change to:"Welldynerx, Llc -"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Add mailbox after Welldynerx-Fl.
There must be something missing between the two to tell InDesign there is a second search command?
Copy link to clipboard
Copied
Apologies my comment was meant for Javascript but now I see that you are talking about Applescript. I tried your strings and it seems to be working for me, see the screengrab at the following link
-Manan