Question
Scripting URL Hyperlinks for Images
Hi,
Been scripting for a long time, relatively new to InDesign though...I'm trying to make a script that creates unique hyperlinks for all of the images in a document. I can get a list of all the images, but the problem seems to be that I can't seem get the syntax (or maybe references) correct to create the link.
Here's where I'm at:
make hyperlink with properties {destination:itemURL, source:testImage}
I get this error:
Adobe InDesign CS3 got an error: Invalid value for parameter 'hyperlink source' of event 'make'. Expected hyperlink page item source or hyperlink text source, but received image.
If I have a reference to an image, can I get the page item reference somehow to put in as the source? Or do I need to rewrite the script so it finds all the page items, checks if they are images, and then creates hyperlinks for the ones that are images?
Thanks in advance for your kindness and wisdom,
--Danny
Been scripting for a long time, relatively new to InDesign though...I'm trying to make a script that creates unique hyperlinks for all of the images in a document. I can get a list of all the images, but the problem seems to be that I can't seem get the syntax (or maybe references) correct to create the link.
Here's where I'm at:
make hyperlink with properties {destination:itemURL, source:testImage}
I get this error:
Adobe InDesign CS3 got an error: Invalid value for parameter 'hyperlink source' of event 'make'. Expected hyperlink page item source or hyperlink text source, but received image.
If I have a reference to an image, can I get the page item reference somehow to put in as the source? Or do I need to rewrite the script so it finds all the page items, checks if they are images, and then creates hyperlinks for the ones that are images?
Thanks in advance for your kindness and wisdom,
--Danny