Skip to main content
Participant
August 26, 2011
Answered

Find/Replace?

  • August 26, 2011
  • 2 replies
  • 8665 views

I have looked all thru the documentation including the FDK and don't really see a way to do a global search and replace in extendscript.  The FDK documentation refers to F_APIFIND in the index and TOC for FIND/REPLACE but I don't see the paramters to set for it when I look there.  I assume there is a way to do it, and I'm just not smart enough to see it.  Any clues where I should look or samples somewhere?

TIA - Jim

This topic has been closed for replies.
Correct answer Russ Ward

Jim,

I see I didn't read your post closely enough. My apologies. Indeed, you'll need to control the iteration and string replacement yourself. It doesn't take too much code to do that, though. That's with the FDK... again, I don't know about ExtendScript.

Russ

2 replies

SQUIDDS
Participating Frequently
October 10, 2011

Jim, do you know the features of the Finalyser to find/replace formats, element definitions, words, phrases, find index and brand new conditional text with conditional format.

All is to use in a document or in a book. It's really great.

- Georg

Legend
August 26, 2011

Hi Joe,

I can't speak for ExtendScript, but F_ApiFind() is well-defined on page 102 of the FDK Programmers Reference that I have (as installed with the FDK10). I have used it myself without issue. Are you sure you are looking in the right book?

Russ

Participant
August 26, 2011

I have looked and perhaps I just don't understand - but I don't see anything that lets me specify a replacement string.  Perhaps there is no such thing and I have to iterate thru the finds and replace the text myself?  Seems like there is a find/change dialog so there should be some equivalent functionality to that?

Thanks

Russ WardCorrect answer
Legend
August 26, 2011

Jim,

I see I didn't read your post closely enough. My apologies. Indeed, you'll need to control the iteration and string replacement yourself. It doesn't take too much code to do that, though. That's with the FDK... again, I don't know about ExtendScript.

Russ