Change page destination of a button

I have a book of 54 documents. I 've made in each document some buttons to go to another document (hyperlink). No I have to make this same book in another language. I copied my document, renamed them by changing a suffix (for ex: _be into _fr)

I am wondering if it is possible to change the page destination of a button with a script… I hope that it’s possible because it is a lot of work to relink all this buttons.

Is there someone who can help me with this?

Well, without knowing exectly what you want changed into what, I’d suggest using perl.

For example:

set myFile to "/Users/blah/path/to/file.htm"
do shell script ("perl -pi'._fr' -e 's|\\Q.The text you want replaced (can contain any character)\\E|The replacement text|g'" & space & myFile's quoted form)

Of course, this could be done from the “Terminal” directly:

These one-liners will create a file or the same name in the same location except with the “._fr” extension and the contents of the file will have every instance of “.The text you want replaced (can contain any character)” replaced with “The replacement text”. :cool:



I am making an interactive pdf of an indesign book (contains 54 documents). I’ve made some buttons in each document. The activity behind the button is “go to destination”. For example in the BE version, the destination is “table_BE”. In the FR version, the destination will be “table_FR”.

I want to make a script to open an indesign file; search for buttons, change the destination and save the document.

Is this possible?