• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

what is the CS3 equivalent to the text cleanup script

New Here ,
Aug 10, 2007 Aug 10, 2007

Copy link to clipboard

Copied

I used the javascript text cleanup in CS2 but it doesn't seem to work in ID CS3. Is there an equivalent script that will work for text cleanup in CS3?
TOPICS
Scripting

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 10, 2007 Aug 10, 2007

Copy link to clipboard

Copied

Look in the Scripts panel under Application/Samples/JavaScript for FindChangeByList.jsx

Dave

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 10, 2007 Aug 10, 2007

Copy link to clipboard

Copied

Hi Stephen,

If you use this script, make sure that you make the change I documented in:

http://www.adobeforums.com/cgi-bin/webx/.3bbf275d.3bc3ed3c/3

...or get the updated version from:

http://www.adobe.com/products/indesign/xml_scripting.html

(once you get there, you'll need to click the Scripting Information tab to display the scripting downloads)

FindChangeByList.jsx is much more capable than the old TextCleanup script, and can do grep and glyph searches in addition to plain text searches.

Thanks,

Ole

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 07, 2008 Jan 07, 2008

Copy link to clipboard

Copied

Thanks for the updated version of the FindChangeByList.jsx script.

I'm using it to re-map Greek Type 1 characters from a proprietary font to their correct Unicode characters in Myriad Pro. However, I had a problem with one particular glyph that I wasn't able to use (it's in the "fi" ligature spot so the glyph is tough to get to).

Here's the rule I got to work. I had to use "glyphID" instead of the "findWhat"/"changeWhat" pair, and make sure to use the GID of the glyph instead of the Unicode value.

I could have saved a lot of time if the sample file included a glyph line, so here's what I found to work for my fonts. (And yes, the font is named "Phili Bold Obl".)

Imagine tabs instead of CR for readability:
glyph
{glyphID:200, appliedFont:"Phili Bold Obl", fontStyle:"Regular"}
{glyphID:599, appliedFont:"Myriad Pro", fontStyle:"Bold Italic"}
{caseSensitive:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

Darryl Zurn

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 29, 2008 Mar 29, 2008

Copy link to clipboard

Copied

This version is not as powerful as TextCleanUp script, since it is limited to the one fixed text file. TextCleanUp lets you pick the file you want to use for the replacement. I have several files for repeated tasks throughout the process of preparing a document for publication.
With this script I have to create several files then rename the one I want to the default file name.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 29, 2008 Mar 29, 2008

Copy link to clipboard

Copied

Hi Markinboone,

Actually, FindChangeByList is much more powerful than TextCleanup (I wrote both scripts)--it has lots more features. All you need to do to get the ability to select one file or another is rename the FindChangeByList.txt file. If the script can't find a file with that name, it'll ask which file you want to use.

Thanks,

Ole

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 30, 2008 Mar 30, 2008

Copy link to clipboard

Copied

Thanks. Is there a place to find all the secrets of the FindChangeTExt script documented? Like how to specify formatting properties?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 30, 2008 Mar 30, 2008

Copy link to clipboard

Copied

LATEST
Specifically, here's something I can't figure out: how to find text, the replace with nothing (delete it).

I'm converting PM tags in imported Word document files. I want to set the paragraph style for the paragraph a tag is found in, then delete the tag, so that:

<A>Heading Level A Text

becomes

Heading Level A Text   [with paragraph style A applied]

With this setting the style is applied, but the tag is not stripped, rather left alone (tabs replaced with line endings here):
text
{findWhat:"<A>"}
{changeTo:"", appliedParagraphStyle:"A"}

I tried entering a second line with the third field {changeTo:""} , that is, without attributes, but I got the same result.

I also copied the line and modified it for other tags (to at least get the styles applied), but none of the finds work after the first one. Is there something that needs to be done to set a find to start over (top of the file)?

And what will happen when a find has no results? Does it ignore the change, then move to the next line? I thought that might be what's stopping the script with additional lines, but the second line should have found several instances of the find criteria.

Why don't I convert the PM tags to ID tags in the document first? you may ask. The problem there is I have to save the document as text only in order to import it, so I'd lose any character formatting like italics. I found out Word 2007 will search for formatted text, then insert text (such as an ID characterstyle tag) before and after it, so I can try getting characterstyle tags around formatting, but I'd rather minimize the prep work in Word.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines