0 Replies Latest reply on Mar 27, 2009 7:32 AM by (Cheri_McDannell)

    Please help. Scripting change from CS2 to CS4

      I finally figured out how to write the script in InDesign CS2 and get it to format my schedule exactly as I needed it.  We recently upgraded to CS4 and that script does not work any more.  I would like to remove the old CS2 version but can't because I still need it to format this particular project.  Here is the script I have from CS2<br /><br />//NewFindChangeList.txt<br />//Data file for use with the TextCleanup.jsx script for InDesign CS2.<br /><br />//<br /><br />//<br /><br />//<br />//The format of each record in the file is:<br />//findProperties<tab>changeProperties<tab>range<tab>description<br />//<br />//Where:<br />//<tab> is a tab character<br />//<br />//findProperties is a properties record (as text)<br />//<br />//changeProperties is a properties record (as text)<br />//<br />//range is either "all" or "once" (Use "all" with caution, as it is very easy to end up in an infinite loop.<br />//Never use "all" when finding/changing formatting.)<br />//<br />//description is a description of the find/change operation<br />//<br />//Very simple example:<br />//{findText:"  "}     {changeText:" "}     Find all double spaces and replace with single spaces.<br />//<br />//More complex example:<br />//{findText:"^9^9.^9^9"}     {applied character style:"price"}     Find $10.00 to $99.99 and apply the character style "price".<br />//<br />//All InDesign search metacharacters are allowed in the findText properties; all but the wildcards are allowed in the changeText properties.<br />//<br />//More examples:<br />//Red text changes.<br />//{findText:"", strikeThru:true, fillColor:"Red"}     {changeText:"", strikeThru:true, position:superscript, fillColor:"Black",}     once     Red strike.<br />//{findText:"", underline:true, fillColor:app.activeDocument.colors.item("Red")}     {changeText:"", underline:true, position:superscript, fillColor:"Black",}     once     Red underline.<br />//{findText:"", fillColor:color "Red" or active document}     {changeText:"", position:superscript, fillColor:"Black",}     once     Red text.<br />//Blue text changes.<br />//{findText:"", strikeThru:true, fillColor:color "Blue" of active document}     {changeText:"", strikeThru:true, position:subscript, fillColor:"Black",}     once     Blue strike.<br />//{findText:"", underline:true, fillColor:color "Blue" of active document}     {changeText:"", underline:true, position:subscript, fillColor:"Black",}     once     Blue underline.<br />//{findText:"", fillColor:color "Blue" of active document}     {changeText:"", position:subscript, fillColor:"Black",}     once     Blue text.<br />//<br /><br />{findText:"Evening"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"Web Based"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"Hybrid"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"First 7.5 Weeks"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"Second 7.5 Weeks"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"First 10 Weeks"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"Second 10 Weeks"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"Middle 10 Weeks"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"First 5 Weeks"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"Second 5 Weeks"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"Third 5 Weeks"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"First 8 Weeks"}     {appliedCharacterStyle:"Evening/Weeks"}     once<br />{findText:"Credits "}     {changeText:"Credits"}     all<br />{findText:"<text#>"}     {changeText:"", appliedParagraphStyle:app.documents.item(0).paragraphStyles.item("Text#")}     once<br />{findText:"<text#>"}     {changeText:""}     once<br />{findText:"<tab>"}     {changeText:"^t"}<br />{findText:"<Title>"}     {changeText:"", appliedParagraphStyle:app.documents.item(0).paragraphStyles.item("Title")}     once <br />{findText:"<Title>"}     {changeText:""}     once<br />{findText:"<Text1>"}     {changeText:"", appliedParagraphStyle:app.documents.item(0).paragraphStyles.item("Text 1")}     once <br />{findText:"<Text1>"}     {changeText:""}     once<br />{findText:"<class note>"}     {changeText:"", appliedParagraphStyle:app.documents.item(0).paragraphStyles.item("class note")}     once<br />{findText:"<class note>"}     {changeText:""}     once<br />{findText:"<Section>"}