Hello -
We run an automated catalogue producing system, taking information out of FileMaker and putting it into InDesign using XTags and a lot of rather beefy AppleScripts. In this catalogue we have four book jacket images on a page. The images have filenames which are named <13digitISBN>_fc25.tif (for example 7890125123456_fc25.tif); the rectangles containing them have Script Labels Jacket 1 thru Jacket 4.
I am now trying to do the following:
- Create a new Hyperlink destination called <13digitISBN>, going to www.foo.com/<13digitISBN>
- Apply this Hyperlink destination to the rectangle containing the jacket.
This means that when I make a Smart PDF of my catalogue, the jacket images will be links to a catalogue website.
I can do part 1:
tell application "Adobe InDesign CS2"
tell active document
tell rectangle "Jacket 1"
set Props to properties of item link of graphic 1
set TheName to name of Props
end tell
set TheISBN to text 1 thru 13 of TheName
set TheURL to "http://www.foo.org/" & TheISBN
try
make hyperlink URL destination with properties {name:TheISBN, destination URL:TheURL}
end try
end tell
end tell
But I am having great troubles with part 2. I can’t work out how to actually apply the hyperlink to the jacket. I can’t see anywhere in the properties of the rectangle anywhere to say ‘use this hyperlink’, and I can’t see anywhere in the properties of the hyperlink saying ‘Use this rectangle’!
Any help very gratefully received.
Many thanks,
Hamish