Re: Adobe Illustrator Scripting
Re: Adobe Illustrator Scripting
- Subject: Re: Adobe Illustrator Scripting
- From: Simon Topliss <email@hidden>
- Date: Fri, 17 Sep 2004 17:00:18 +0100
Why do you want to select the items first?
The easiest way to convert the text items is...
<x-tad-bigger>tell</x-tad-bigger><x-tad-bigger> </x-tad-bigger>
<x-tad-bigger>application</x-tad-bigger><x-tad-bigger> "</x-tad-bigger>
<x-tad-bigger>Adobe Illustrator 10</x-tad-bigger><x-tad-bigger>"
</x-tad-bigger>
<x-tad-bigger>convert to paths</x-tad-bigger><x-tad-bigger> (</x-tad-bigger>
<x-tad-bigger>text art items</x-tad-bigger><x-tad-bigger> </x-tad-bigger>
<x-tad-bigger>of</x-tad-bigger><x-tad-bigger> </x-tad-bigger>
<x-tad-bigger>current document</x-tad-bigger><x-tad-bigger>)
</x-tad-bigger>
<x-tad-bigger>end</x-tad-bigger><x-tad-bigger> </x-tad-bigger>
<x-tad-bigger>tell</x-tad-bigger><x-tad-bigger>
</x-tad-bigger>
I can help you with the folder action as well if you want (although I wouldn't personally use a FA, I'd use an idle handler to watch a given folder).
Simon
On 17 Sep 2004, at 2:30 pm, Simon P. Grasser wrote:
Hi
I am new to AppleScript and wanted to write a Folder Action script that
would let me convert all text items in an Illustrator document to outlines.
The Idea was that I could drop a document either .ai or .eps into a
Finder folder named "In". Illustrator would then automatically open the
dropped document, change all text to outlines, save the document in the
same format as the original and append "_text-ol" to its name. the new
document and the original would then be moved to a Finder folder named
"Processed"
dropping a hello.ai into "In" would result in two documents - hello.ai
and hello_text-ol.ai respectively - in the folder "Processed". However I
am already stuck with selecting all items in an Illustrator document. I
found no hints in the Illu Dictionary on how to do this.
This is what I have so far:
tell application "Illustrator CS"
--something like this
--set currentSelection to every item
-- Make sure the selection is a page item,and not text in a text art item.
-- If the selection is text, the class of the selection will be text,
rather than list.
if class of currentSelection is list then
-- Process each item in the selection, looking for text art items.
repeat with targetItem in currentSelection
if class of targetItem is text frame then
convert to paths targetItem
end if
end repeat
end if
--save document in processed folder appending "text-ol" to its name
--close document
end tell
-- move original doc to processed
Any help is greatly appreciated
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden