"Recognition" of upper or lower case in a field
Posted: Wed Oct 14, 2009 1:26 pm
Hi, a small test again:
Result required is whether or not a character is upper case or lower case.
A field for input, a button and field for output.
Whether it's upper or lower case, the result is always "U". I know that all characters have their own ASCII number, which surely must be inherent in the typed character, so surely this should work? I'll script using CharToNum I guess, it's bound to work then.
But I'm just curious to know why this doesn't work. Does anyone know please?
Result required is whether or not a character is upper case or lower case.
A field for input, a button and field for output.
Code: Select all
on mouseUp
put field "FI" into tW
if tW="A" or tW="B" or tW="C" then ----etc
put "U" into fld "FO"
else
if tW="a" or tW="b" or tW="c" then ------etc
put "L" into field "FO"
end if
end if
end mouseUp
But I'm just curious to know why this doesn't work. Does anyone know please?