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

FindChangeByList.jsx - help with text file list of commands

New Here ,
Jun 21, 2012 Jun 21, 2012

I have been working on a scrip using the FindChangeByList.jsx script. I'm having issues coding the text file that the script calls in.

I have a feeling this is a simple fix that someone with any aptitude for coding would easily figure out quickly. This is obviously not my forte.

I'm using the format below to set up my search/replace commands within the text file. The one below is what I figured out for replacing " x " to "x" (hence, taking out the spaces before and after the "x")

text{findWhat:" x "}{changeTo:"x"}{includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}Find all space-x-space and replace with an x.

I can't figure out these:

1) Find Double Quotation marks and convert them to Inch marks.

What I have:

text     {findWhat:"\"'}     {changeTo:"-- I don't know what should go here I've tried ^_" } (after this is the include Footnotes:true etc, etc part that I don't tweak at all since it doesn't apply)

2) Italicize any instance of the word "Signature"

text     {findWhat:"Signature'}     {appliedCharacterStyle:"Italic"} - this throws up an error message??

3) Change the style of the cents amount of a price to the SuperScript character style I've defined. So for a number like 199.99 - the last two 9's become superscripted

text     {findWhat:"^9^9^9.^9^9'}     {changeTo "I don't know what I should do here"} - this throws up an error message??

4a) After changing the cents to superscript - delete the decimal point that separates the dollar amount from the cents amount. (Hence 199.99 becomes 19999 where the last two 9's become superscript).

text     {findWhat:"^9^9^9.^9^9'}     {changeTo "I can't use ^9^9^9^9^9, because it changes the number to "^9^9^9^9^9" ?? "}

Any help would be greatly appreciated!

Thanks in advance -

Drew

TOPICS
Scripting
1.3K
Translate
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 10, 2013 Jun 10, 2013

I'm bumping this because I'd also like to know if anyone has an answer for the quotations/inch marks problem.

Translate
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 10, 2013 Jun 10, 2013
LATEST

This:

{findWhat:"\"'} // double-quote back-slash double-quote single-quote

is a typo. It should be:

{findWhat:"\""} // double-quote back-slash double-quote double-quote

Or more simply:

{findWhat:'"'} // single-quote double-quote single-quote

To get the inch symbol, use:

String.fromCharCode(8243)

Translate
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