Skip to main content
Inspiring
November 18, 2019
Question

FindChangeList working for character styles but not paragraph styles InD 2020 on an iMac with Mojave

  • November 18, 2019
  • 1 reply
  • 390 views

I am trying to create a simple text file to use with the FindChangeList script and although the character style changes I am asking for work great, the paragraph styles don't work at all. Does anyone have any idea what I am doing wrong? 

 

The first two find/changes work great, and the third changes the character style to none, but won't apply the paragraph style.

 

Here is my text file:

text {findWhat:" ^p"} {changeTo:"", appliedCharacterStyle:"temp"} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false, searchBackwards:false} //assign temp to space before return
 
text {findWhat:" ", appliedCharacterStyle:"temp"} {changeTo:""} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false, searchBackwards:false} //delete space before return
 
text {findWhat:"Morning Moment With Families^p"} {changeTo:"", appliedCharacterStyle:"[No character style]", appliedParagraphStyle:"h1 B"} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false, searchBackwards:false} //apply h1 B with ch style none
 
Thanks to anyone who can help.
This topic has been closed for replies.

1 reply

brian_p_dts
Community Expert
Community Expert
November 19, 2019

My two thoughts: you are replacing the text with nothing, so there is no paragraph to style. It's just switching to whatever pstyle proceeded it. That, seems to be the most likely scenario. It could be that the character style that you changed to None is putting an override on the paragraph style. 

Inspiring
November 19, 2019

Thanks, brianp311.

 

I tried revising the search to this: 

text {findWhat:"Morning Moment With Families^p"} {changeTo:"MMWF^p", appliedParagraphStyle:"h1 B"} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false, searchBackwards:false} //h1 
 
The text of the headline changes correctly, but no ParagraphStyle is applied. If I switch the , appliedParagraphStyle:"h1 B" to , appliedCharacterStyle:"ital" (one of my styles), it works just fine.
Any thoughts? 
This file is coming in from Word, and I have tried stripping local overrides, deleting the styles that come in with Word, etc. No luck.
 
 
Inspiring
November 20, 2019

Solved. It turns out that since I have organized my style sheets in folders, the script wasn't finding them. I think I needed more than just the appliedParagraphStyle as a direction, I would have needed to indicate a folder in the style palette. Phew!