• 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: Converting characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting characters


  • Subject: Re: Converting characters
  • From: Arthur J Knapp <email@hidden>
  • Date: Tue, 07 Aug 2001 18:13:24 -0400

> Date: Tue, 07 Aug 2001 12:39:19 -0700
> Subject: Re: Converting characters
> From: Paul Berkowitz <email@hidden>

> or else use the ASCII character definitions to be specific:
>
> if thechar = ASCII character 88 then --upper-case "X"
> set newchar to "\\"
> else if thechar = ASCII character 90 then --upper-case "Z"
> set newchar to "\""
> end if

I'm sorry, Paul, but the above isn't true. Whether you type a
literal letter or specify it with the ASCII commands, AppleScript
is still going to be case-insensitive by default:

set theChar to "z" -- lowercase z

if theChar = ASCII character 90 then -- uppercase Z

-- this will be true

else
...

You would have to also convert theChar for this method to work:

if (ASCII number theChar) = (ASCII character 90) then
...

Your first suggestion is the best:

considering case
...


Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden

Hey, check out:
<http://developer.apple.com/techpubs/macos8/InterproCom/AppleScriptScripters
/AppleScriptLangGuide/>


  • Follow-Ups:
    • Re: Converting characters
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: How do you check the equivalency of references?
  • Next by Date: Re: Converting characters
  • Previous by thread: Re: Converting characters
  • Next by thread: Re: Converting characters
  • Index(es):
    • Date
    • Thread