Re: Illustrator Scripting Help Needed
Re: Illustrator Scripting Help Needed
- Subject: Re: Illustrator Scripting Help Needed
- From: Shane Stanley <email@hidden>
- Date: Tue, 14 Oct 2003 09:29:23 +1000
On 14/10/03 1:54 AM +1000, Rob Stott, email@hidden, wrote:
>
I'm trying to write a script, part of which involves deleting
>
everything on the artboard to the right of a particular point. The
>
chunk below looks right to me but does absolutely nothing - not even an
>
error message.
>
>
tell application "Adobe Illustrator 10"
>
tell front document
>
delete (every path item whose (item 1 of position) > 200)
>
end tell
>
end tell
>
>
I was expecting to have to delete all path items, then all text path
>
items etc etc in turn. Can anyone tell me what I'm doing wrong
I guess you're being wildly optimistic. You can use a whose clause with a
property, but not part of a property, as you're attempting here.
>
or
>
alternatively suggest a better way of doing this?
You're going to have to loop through, something like this...
tell application "Adobe Illustrator 10"
tell document 1
set thepos to position of every page item
repeat with i from (count of items of thepos) to 1 by -1
if item 1 of item i of thepos > 200 then
set locked of page item i to false
delete page item i
end if
end repeat
end tell
end tell
--
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.