• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

beforeSave "Cannot delete the target of an active script event" error

New Here ,
Sep 04, 2013 Sep 04, 2013

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.

TOPICS
Scripting

Views

926

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 04, 2013 Sep 04, 2013

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 05, 2013 Sep 05, 2013

Copy link to clipboard

Copied

Yes it's the only thing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Sep 09, 2015 Sep 09, 2015

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines