• 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
Re: Illustrator Text Extraction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Illustrator Text Extraction


  • Subject: Re: Illustrator Text Extraction
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 01 Mar 2002 09:28:44 +1100

On 1/3/02 2:32 AM +1000, Hellum Timothy, email@hidden, wrote:

> I know only a little about AppleScript, but have wondered if there's a way
> to extract text placed or written into an Illustrator document and have it
> saved into a separate text file such as BBEdit for example. The Illustrator
> files I am potentially dealing with will have graphics placed on them as
> well, if that makes a difference.

Sure. If there is only one bit of text, you could do something like this:

on open fileList
repeat with aFile in fileList
tell application "Adobe Illustrator 10"
open aFile forcing CMYK
tell document 1
set theText to contents of text art item 1
end tell
close document 1 saving no
end tell
set fileRef to (open for access file ((aFile as text) & "*") with write
permission)
write theText to fileRef
close access fileRef
end repeat
end open

This would give you a droplet that would open each file in turn, get the
text, and then save it in a text file with the same name plus an asterisk.

It would get a bit more complicated if there were more text art items -- how
you handle that would depend on the specifics of the files.

And Illustrator 10 is much better behaved under OS X when you're scripting
it.

--
Shane Stanley, email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Trashing OE's "Old " files.
  • Next by Date: Re: Extracting from text [Lecture]
  • Previous by thread: Re: Trashing OE's "Old " files.
  • Next by thread: Re: Illustrator Text Extraction
  • Index(es):
    • Date
    • Thread