• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Applescript crashing Adobe Illustrator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Applescript crashing Adobe Illustrator


  • Subject: Applescript crashing Adobe Illustrator
  • From: Jim Skibbie <email@hidden>
  • Date: Wed, 05 May 2010 14:13:09 -0500
  • Thread-topic: Applescript crashing Adobe Illustrator

Title: Applescript crashing Adobe Illustrator
I’m working on an Applescript for Adobe Illustrator. When the script runs, it causes Illustrator to crash with the error:

Adobe Illustrator got an error: Connection is invalid. Error –609.

Here’s the portion of the script that causes the crash. This code works for some files and for other files, it crashes Illustrator.

Any ideas?

set LayersToSave to {"Names", "Of", "Specific", "Layers"}

tell application "Adobe Illustrator"
   set AIDoc to current document
   set theLayers to every layer of AIDoc
end tell
repeat
with j from (count of theLayers) to 1 by -1
   set theName to name of item j of theLayers
   if LayersToSave does not contain theName then my RemoveThisLayerFromFile(theName, AIDoc)
end
repeat

on RemoveThisLayerFromFile(LayerName, doc)
   tell application "Adobe Illustrator"
       if (exists layer LayerName of doc) then
           delete layer LayerName of doc
       end if
   end tell
end
RemoveThisLayerFromFile

Thanks.
Jim
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Applescript crashing Adobe Illustrator
      • From: Stan Cleveland <email@hidden>
  • Prev by Date: Re: Transmit 3 "on open" vs "choose file" problem
  • Next by Date: Re: Applescript crashing Adobe Illustrator
  • Previous by thread: Re: Transmit 3 "on open" vs "choose file" problem
  • Next by thread: Re: Applescript crashing Adobe Illustrator
  • Index(es):
    • Date
    • Thread