• 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: Faulty text item delimiters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faulty text item delimiters


  • Subject: Re: Faulty text item delimiters
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 11 Oct 2005 10:45:41 -0700
  • Thread-topic: Faulty text item delimiters

On 10/11/05 1:25 AM, "Shane Stanley" <email@hidden> wrote:

> On 11/10/05 6:15 PM, "Paul Berkowitz" <email@hidden> wrote:
>
>>> The same. Have you had the user try that snippet as a separate script?
>>
>> Of course. That's how I nailed this down.
>
> Sorry, I meant as in sending it as a discrete compiled script, not relying
> on things like cut and paste and no other code.
>
>> It makes me wonder if somehow there's a rogue ASCII 0 in there
>
> That was my feeling. Even a character count might help.

That's not what's happening. I asked him to run this:

set AppleScript's text item delimiters to {"."}
tell application "iCal" to set icalVersion to version as string
set AppleScript's text item delimiters to {""}
set chars to every character of icalVersion
set asciiNums to {}
repeat with i from 1 to (count chars)
    set char to item i of chars
    set end of asciiNums to ASCII number char
end repeat

{chars, asciiNums}


It should result in

    {{"2", ".", "0", ".", "2"}, {50, 46, 48, 46, 50}}

but if he had ASCII 0 characters there, he'd get something more like

    {{"", "2", "", ".", "", "0", "", ".", "", "2"}, {0, 50, 0, 46, 0, 48, 0,
46, 0, 50}}


He got

    --> {{"2", ".", "0", ".", "2"}, {50, 46, 48, 46, 50}}

like the rest of us. So he's got the right string, but text item delimitees
simply aren't working in strings, for him, though they work (with all the
correct string-to-Unicode equivalences using a string "." as delimiter) in
Unicode text. Weird.



--
Paul Berkowitz


 _______________________________________________
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

References: 
 >Re: Faulty text item delimiters (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: recursion depth
  • Next by Date: Re: character of a string which is a number.
  • Previous by thread: Re: Faulty text item delimiters
  • Next by thread: Re: Faulty text item delimiters
  • Index(es):
    • Date
    • Thread