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

Using FindChangeByList Javascript

New Here ,
Mar 07, 2012 Mar 07, 2012

Copy link to clipboard

Copied

I read the excellent article in Nov 08 issue of InDesign Magazine on using FindChangeByList. I am publishing stories on the card game Bridge which uses symbols for Hearts, Spades, Diamonds, and Clubs. I would like to use a script that replaces easily-typed characters for the suit symbols and makes the Hearts and Diamonds red. I have managed to write a script that replaces the symbols, but cannot find a way to make some of them red. Or better yet, applies a Character Style. Below is my script. Can anyone help me change the Hearts and Diamonds to red?

glyph{glyphID:4,appliedFont:"Times",fontStyle:"Regular"}{glyphID:386,appliedFont:"Apple Symbols",fontStyle:"Regular"}{includeFootnotes:false, includeMasterPages:false, includeHiddenLayers:false}Find all exclamation marks and replace with clubs.
glyph{glyphID:7,appliedFont:"Times",fontStyle:"Regular"}{glyphID:383,appliedFont:"Apple Symbols",fontStyle:"Regular"}{includeFootnotes:false, includeMasterPages:false, includeHiddenLayers:false}Find all exclamation marks and replace with clubs.
glyph{glyphID:6,appliedFont:"Times",fontStyle:"Regular"}{glyphID:388,appliedFont:"Apple Symbols",fontStyle:"Regular",appliedCharacterStyle:"Red Suits"}{includeFootnotes:false, includeMasterPages:false, includeHiddenLayers:false}Find all pound signs and replace with hearts.
glyph{glyphID:35,appliedFont:"Times",fontStyle:"Regular"}{glyphID:389,appliedFont:"Apple Symbols",fontStyle:"Regular",appliedCharacterStyle:"Red Suits"}{includeFootnotes:false, includeMasterPages:false, includeHiddenLayers:false}Find all at marks and replace with diamonds.
TOPICS
Scripting

Views

1.6K

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 ,
Jun 22, 2015 Jun 22, 2015

Copy link to clipboard

Copied

Thank you very much. I was looking for this solution for a long time.

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
Guest
Jun 23, 2015 Jun 23, 2015

Copy link to clipboard

Copied

I had the same problem with a bridge column we run in the newspaper. I had to run the Hearts and Diamonds with a black outline and a white filler. I skipped the glyph and went with text to find the unicode for Hearts and Diamonds in the article. I did this because I originally had to change the stand-in characters (™, ©, ®, ß) for the suites and change them to the unicodes for Hearts, Diamonds, Clubs and Spades. Then I searched for the unicodes for the Hearts and Diamonds and changed the "strokeColor" and "fillColor" to the right color. You could change the "fillColor" to whatever your red color is called.

text{findWhat:"\u2665"}{strokeColor:"Black", fillColor:"Paper", strokeWeight:"0.25"}{includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
text{findWhat:"\u2666"}{strokeColor:"Black", fillColor:"Paper", strokeWeight:"0.25"}{includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

Hope this helps.

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 ,
Jun 28, 2015 Jun 28, 2015

Copy link to clipboard

Copied

Using glyphID is really hard. Unicode will be easier. I will try your way on Monday.

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
Guest
Jun 29, 2015 Jun 29, 2015

Copy link to clipboard

Copied

LATEST

This might help -

\u2660 = black spade

\u2663 = black club

\u2665 = black heart

\u2666 = black diamond

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