• 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: 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


  • Follow-Ups:
    • Re: Error geetting offset of char in errMsg
      • From: John W Baxter <email@hidden>
    • Re: Error geetting offset of char in errMsg
      • From: Andy Wylie <email@hidden>
References: 
 >Re: Error geetting offset of char in errMsg (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Terminal Program...
  • Next by Date: Re: New AS Book?
  • 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