Re: Adobe Illustrator Scripting
Re: Adobe Illustrator Scripting
- Subject: Re: Adobe Illustrator Scripting
- From: Simon Topliss <email@hidden>
- Date: Wed, 19 Jun 2002 22:18:58 +0100
Hi Jim,
I don't think it's possible to set the output resolution of the document. As
you've noticed, the property is read only. It's the same with Illustrator
10, by the way.
You can, however, use 'whose clauses' instead of a repeat loop to speed up
setting the resolution of individual path items.
tell application "Adobe Illustrator 9.0.2"
tell document 1
try -- will error if no path items are locked
set locked of (path items whose locked is true) to false
end try
try
set resolution of (path items whose resolution < 2400) to 2400
end try
end tell
end tell
Simon
On 19/6/02 8:10 pm, "Jim Eller" <email@hidden> wrote:
>
Hi. I hope their is someone listening who has experience scripting
>
Illustrator. I work for a commercial offset printer and our RIP software
>
requires our line work images (vector artwork) to be set to a resolution
>
of 2400 dpi. Of course, in Illustrator there are two places to do that;
>
1) in the "Attributes" window, and 2) in the Document Setup menu under
>
the Printing & Export tab. I can easily set the attributes of all paths
>
in a document to 2400 dpi with a script. What I need to do though, is
>
write a script that will set the document's "output resolution" property
>
to 2400. According to the documentation, that particular property is
>
"read only." Has anyone else had experience with this that can offer
>
suggestions? I have even thought of having the script create a new
>
document with the properties I want and then copy and past the artwork
>
from the old document into the new but I'd rather use that as a last
>
resort because of the possibility of errors in copying.
>
>
Adobe Illustrator 9.0.2
>
Mac OS 9.2.1
>
Applescript 1.6
>
>
Here is the script I use for changing the artwork attributes to 2400:
>
>
tell application "Adobe Illustrator. 9.0.2"
>
if document 1 exists then
>
set docName to name of current document
>
set pathCount to count of path items of current document
>
>
tell document docName
>
if pathCount > 0 then
>
try
>
repeat with i from 1 to pathCount
>
if locked of path item i = false then
>
set the resolution of path item i to 2400.0
>
else
>
set locked of path item i to false
>
set the resolution of path item i to 2400.0
>
end if
>
end repeat
>
end try
>
end if
>
close with saving --modify this to save as EPS with Illustrator 9
>
properties
>
end tell
>
>
else
>
display dialog "You have to open an Illustrator document before
>
running this script!"
>
end if
>
end tell
>
>
This script will get the output resolution, but not change the property.
>
>
tell application "Adobe Illustrator. 9.0.2"
>
set outRes to output resolution of document 1
>
if outRes is not equal to 2400.0 then
>
beep
>
end if
>
end tell
>
>
[demime 0.98b removed an attachment of type text/x-vcard which had a name of
>
jim.vcf]
>
_______________________________________________
>
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.
_______________________________________________
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.