Re: Converting characters
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/>