• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Error geetting offset of char in errMsg
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error geetting offset of char in errMsg


  • Subject: Re: Error geetting offset of char in errMsg
  • From: Nigel Garvey <email@hidden>
  • Date: Mon, 18 Jun 2001 13:57:15 +0100

Shane Stanley wrote on Mon, 18 Jun 2001 08:41:38 +1000:

>On 13/6/01 9:48 AM +1000, Nigel Garvey, email@hidden, wrote:
>
>> work-rounds that have worked in the past include:
>>
>> set message to message as unicode text as text
>>
>> or:
>>
>> set the clipboard to the message
>> set message to the clipboard as text

As I corrected myself later, this should be 'the clipboard as string'.
'Text' and 'string' aren't equivalent in this context.

>Mark Aldritt's solution:
>
>string message

That's definitely going in my collection! :-) However, I'm never happy
until I've run alternative approaches through comparative speed tests.
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

The first four should all seem the same in normal use.

NG


  • Follow-Ups:
    • Re: Error geetting offset of char in errMsg
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Learning AppleScript (was Re: New to the list...)
  • Next by Date: Re: How to 'load' osaxen
  • Previous by thread: Re: Error geetting offset of char in errMsg
  • Next by thread: Re: Error geetting offset of char in errMsg
  • Index(es):
    • Date
    • Thread