Re: Sending TEXT values in Apple Events with AppleScript 2.0
Re: Sending TEXT values in Apple Events with AppleScript 2.0
- Subject: Re: Sending TEXT values in Apple Events with AppleScript 2.0
- From: Philip Aker <email@hidden>
- Date: Wed, 04 Jun 2008 00:37:49 -0700
On 08-06-03, at 17:16, Scott Babcock wrote:
In the new world of Unicode-only strings, I'm at a loss as to how I
can send an Apple Event from AppleScript 2.0 in which the value of
one of the parameters is required to be an 8-bit string. I've tried
to coerce the value to 'string' in the event call, but to no avail.
Here's my code:
set msg to "This is the message"
tell application "FooBar" to <<event my_event>> given <<class
yatz>>:length of msg, <<class putz>>:msg as string
This works fine in Tiger (AppleScript 1.10.7), but fails on Leopard
(AppleScript 2.0). Does anyone know of a way to send an 8-bit string
as the value of an event parameter from AppleScript 2.0?
If you can't get:
msg as «class utf8»
to work then I'd say you're up the proverbial creek with out the
proverbial paddle. It was previously noted that "as string" worked on
Leopard for one coercion case where others did not but I can't
remember the exact circumstance right now.
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden