2 people found this helpful
afterImport event is triggered after you place something into your document: an image, a text file, etc. So that's not what you need in this case.
BTW, you don't mention which version you use. CS5 has many new events, but I hasn't studied them yet -- in the scripting reference I found the following:
AFTER_LINKS_CHANGED -- Dispatched after one or more links in the Event have been added, deleted, or modified. This event bubbles. This event is not cancelable. (default: afterLinksChanged)
Probably you can use it for your script -- I can't check this at the moment.
If you are on CS3/4 you can write a script that runs at certain intervals in the background and triggers another script that loops thru all links in the document and if a link is modified and its type is incopy file, do something to it.
Thank you, Kasyan.
Both of those are good solutions.
We are currently using InDesign CS4 and InCopy CS5. I'm hoping to get them to purchase the whole CS5 suite soon, since I'd like to start writing scripts for InDesign CS5 as soon as possible, as long as I'm going to have to be doing it in the not too distant future anyway. The greater variety of event handlers sounds like it might be something that is crucial to the project I'm working on, so that adds to the argument for getting CS5.
Thanks again. You have no idea how helpful this is. I made some promises to my boss yesterday that I later realized were based on assumptions of mine about the InDesign/InCopy system that didn't make any sense, and I was going to have to retract my promises. But after reading your response I think I can still deliver, in a slightly different way that I had been thinking before.