Re: scripting changes needed for CS2?
Re: scripting changes needed for CS2?
- Subject: Re: scripting changes needed for CS2?
- From: Shane Stanley <email@hidden>
- Date: Mon, 30 Jan 2006 15:14:30 +1100
- Thread-topic: scripting changes needed for CS2?
On 30/1/06 2:48 PM, "Dan Feather" <email@hidden> wrote:
> So, does that mean I MUST use Unicode, or can I specify "as string" wherever
> my script has a text variable?
You can supply a string and it will be automatically coerced where
necessary. But why not work in Unicode?
The problem with sticking with strings comes when you start getting the
contents of stories and frames. Getting the contents "as string" results in
all the Unicode characters being replaced by <nnnn> codes. (And when I say
all the Unicode characters here, I mean all but strictly ASCII characters --
so it includes things like apostrophes and quote marks, em and en dashes,
bullets, etc.)
You can, instead, get the result and then coerce that to a string, but
InDesign uses some Unicode characters for which there is no string
equivalent (some of the special spaces, for example) -- in which case your
scripts will break (and because this may appear to be intermittent, it will
be a right pain to track down).
Combine this with the fact that Tiger returns Unicode text in a many cases
where it used not to, working in Unicode text will probably work out a lot
easier. The only areas you *may* need to resort to strings is when passing
info to other older apps, when writing text files, and perhaps when writing
tagged text.
--
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