Re: Error geetting offset of char in errMsg
Re: Error geetting offset of char in errMsg
- Subject: Re: Error geetting offset of char in errMsg
- From: Shane Stanley <email@hidden>
- Date: Tue, 19 Jun 2001 09:17:48 +1000
On 18/6/01 10:57 PM +1000, Nigel Garvey, email@hidden, wrote:
>
As I corrected myself later, this should be 'the clipboard as string'.
>
'Text' and 'string' aren't equivalent in this context.
Apologies. I was looking for a message to hang this off.
>
>
However, I'm never happy
>
until I've run alternative approaches through comparative speed tests.
Neither are we (until you have done the tests, I mean ;-)).
>
Here are some typical results for 500-iteration repeats of each method in
>
Script Editor on my 4400 (Mac OS 8.6):
>
>
<<class ktxt>> of (msg as record) --> 52 ticks
>
>
msg as record as list as string --> 74 ticks
>
>
msg as Unicode text as string --> 111 ticks
>
>
string msg --> 151 ticks
>
>
set the clipboard to msg
>
the clipboard as string --> 236 ticks
>
>
set fred to characters of msg
>
repeat with char in fred
>
set contents of char to ASCII character (ASCII number char)
>
end repeat
>
fred as string --> 9450 ticks
As usual in AppleScript, guesswork counts for nought...
--
Shane Stanley, email@hidden