Re: Illustrator 10 bug
Re: Illustrator 10 bug
- Subject: Re: Illustrator 10 bug
- From: Simon Topliss <email@hidden>
- Date: Mon, 27 May 2002 14:02:51 +0100
On 24/5/02 12:44 pm, "Simon Topliss" <email@hidden> wrote:
>
Can someone please confirm if this is a bug.
Bug confirmed.
>
>
I'm trying to add text to a text art item in an Illustrator 10 doc. The text
>
contains a blank line, but Illustrator keeps adding two blank lines instead
>
of one and removing the last character of the text.
>
[Snip]
Handler to work around above bug:
-- Begin Script
set theText to "line 1
line 2
line 5"
tell application "Adobe Illustrator 10"
my formatAI10Returns(theText, text art item 1 of document 1)
end tell
on formatAI10Returns(theText, textArtItem)
set oldDelims to AppleScript's text item delimiters
repeat until theText does not contain (return & return)
set AppleScript's text item delimiters to {return & return}
set textItems to text items of theText
set AppleScript's text item delimiters to {return & "[return]" &
return}
set theText to textItems as string
end repeat
set AppleScript's text item delimiters to oldDelims
tell application "Adobe Illustrator 10"
set text of textArtItem to theText
set text of (every line of textArtItem whose contents is "[return]")
to ""
end tell
end formatAI10Returns
-- End Script
_______________________________________________
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.