• 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: Why won't this parse?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why won't this parse?


  • Subject: Re: Why won't this parse?
  • From: Jolly Roger <email@hidden>
  • Date: Thu, 10 May 2001 14:15:00 -0500
  • Replyto: email@hidden

on 5/10/01 11:51 AM, David Graham (email@hidden) wrote:

> At 9:31 AM -0700 5/10/01, Paul Berkowitz wrote:
>>> set AppleScript's text item delimiters to ASCII number 32 -- space
>>
>> ASCII number 32 is not space. It's
>>
>> 51
>
> Hmm...
>
> Then why do I get this?
>
> ASCII number of " "
> -- 32

No. As was pointed out to you already by Paul, your code does not say
"ASCII number of x"; it says "ASCII number x".

I quote your code:

set AppleScript's text item delimiters to ASCII number 32 -- space

As Paul has already told you, you are using the incorrect syntax. In your
code, you set the delimiters to "ASCII number 32". Since the "ASCII number"
command expects a SINGLE-CHARACTER TEXT STRING as the parameter, AppleScript
first coerces the number you supplied (32) into a string ("32"). The "ASCII
number" command only looks at the first character of that string ("3"). If
you will look up the ASCII representation of "3", you will see that it is
indeed 51.

Change your code from this:

set AppleScript's text item delimiters to ASCII number 32 -- space

To this:

set AppleScript's text item delimiters to ASCII character 32 -- space

Or even better ( as suggested by Paul):

set AppleScript's text item delimiters to {" "}

And you will get better results.

> Simpler to be sure, but that isn't the problem. I still have the same error.
> Any suggestions?

If it still doesn't work after you fix your misuse of the ASCII commands as
we have suggested, please post again about the problem, since surely your
results will have changed.

JR


  • Follow-Ups:
    • Re: Why won't this parse?
      • From: David Graham <email@hidden>
References: 
 >Re: Why won't this parse? (From: David Graham <email@hidden>)

  • Prev by Date: Re: Current date notation
  • Next by Date: voodoo in Quark script
  • Previous by thread: Re: Why won't this parse?
  • Next by thread: Re: Why won't this parse?
  • Index(es):
    • Date
    • Thread