Re: INDESIGN CS2: Altering a Text Selection
Re: INDESIGN CS2: Altering a Text Selection
- Subject: Re: INDESIGN CS2: Altering a Text Selection
- From: Shane Stanley <email@hidden>
- Date: Fri, 11 Aug 2006 11:55:23 +1000
- Thread-topic: INDESIGN CS2: Altering a Text Selection
On 11/8/06 11:36 AM, "Buzz Hill" <email@hidden> wrote:
> set item 1 of selection to ((characters 1 thru -2 of
> (item 1 of (text of selection))) as text) as text
Sorry, but that's about the worst option. First, although InDesign returns
selection as a list, it's smart enough to deal with the first item if it's a
single item list, so the "item 1 of..." stuff is unnecessary. Second, you're
getting the characters as a list and then coercing them to a string, which
is inefficient and potentially dangerous because it relies on the contents
of text item delimiters. Third, you're setting new contents of the
selection, which means you will potentially override any styling to parts of
the selection. Fourth, you're not so much deselecting the last character of
the selection but rather deleting it altogether, which I don't think is what
the OP wanted.
--
Shane Stanley <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