Skip navigation
Currently Being Moderated

Indesign CS3 Find and Change Error

Apr 12, 2012 3:44 PM

I aim to find some words in a same file then that apply to an indicated character style, but it doesn't work.

 

According the Adobe's notes. :

//More complex example:

//text {findWhat:"^9^9.^9^9"} {appliedCharacterStyle:"price"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find $10.00 to $99.99 and apply the character style "price".

 

I should be able to get what I want. But it gives me an error like this:

 

but I get this error:

Error Number: 25

Error String: Expected: :

 

Line 159

 

Can someone tells me how can fix it.

 

thanks and please!!!

 
Replies
  • Currently Being Moderated
    Apr 13, 2012 1:32 AM   in reply to HarveyLiu

    It seems like you are mixing Javascript notation (camelCase, such as in "appliedCharacterStyle") and AppleScript notation (separate words, such as "include hidden layers"). Perhaps that's where your poor computer got confused. Use the correct notation for the script language you are using.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 13, 2012 1:37 AM   in reply to [Jongware]

    Wait, that example is from Adobe! That makes it A Bad Example.

     

    Nevertheless, this ought to work if you use the correct notation for the script language you are using.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 13, 2012 2:38 PM   in reply to HarveyLiu

    I think Jongware's right, this example has AppleScript mixed with Javascript, so it won't run completely in either one. AppleScript can't get past the "findWhat", so it bombs out on you there. If you try to run it through Javascript, it's bombing out at footnote part, which is written in AppleScript format.

     

    Try this, through Javascript:

     

    //text {findWhat:"^9^9.^9^9"} {appliedCharacterStyle:"price"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find $10.00 to $99.99 and apply the character style "price".

     

    or this in AppleScript:

     

    //text {find what:"^9^9.^9^9"} {applied character style:"price"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find $10.00 to $99.99 and apply the character style "price".

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points