Copy link to clipboard
Copied
I have a beforeSave applescript (saved in "Applications:Adobe InDesign CS5.5:Scripts:Event Scripts") that used to work in CS3.
Along with a list of other things it checks to see if a page needs a crossword and if it does it brings it in.
In CS5.5 it happily does the list of things but does not do the crossword. I've managed to track down where the error occurs, it is thrown when
it encounters the place command with the following error: "Cannot delete the target of an active script event".
Herewith a simple version that will show it:
try
set file2place to "path:to:crosswrd"
tell application "Adobe InDesign CS5.5"
tell document 1
tell page 1
place file file2place on page item "ThePic"
end tell
end tell
end tell
on error errmsg
display dialog "beforeSave got this error: " & errmsg
end try
Have tried running it in another script (both applescript and extendScript) from within the beforeSave script but still the same problem.
Copy link to clipboard
Copied
Is this the only thing happening when you get the error? Or do you have an interaction you're overlooking between two different event scripts?
Dave
Copy link to clipboard
Copied
Yes it's the only thing.
Copy link to clipboard
Copied
Ok just over 2 years have passed but a way to do this is over here Re: beforeSave "Cannot delete the target of an active script event" error
P.s. Sorry for plagiarizing your title.
P.P.s. You can parse to applescript yourself.