Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
-------------------------------------------------------
on keyDown theKey
if matchText(theKey,"[A-Z]") is false then
pass keyDown
end if
end keyDown
-------------------------------------------------------
The script posted by 'paul_gr' does work, and is a very nice solution to the problem you wanted solving. I would suggest that you look in the dictionary and read the entry for 'matchText'...
Bernd... You are splitting hairs.
'paul_gr's' script did just what the OP asked for when he replied... the OP did not ask for other things to be taken into consideration until later on in the post.
on mouseUp
set the wholeMatches to "false"
if "a" = "A" then answer "Same"
set the wholeMatches to "true"
if "a" = "A" then answer "Same"
end mouseUp
A little knowledge is often a dangerous thing. Right out of the gate, know that if you limit a selection to, say, "a", LC will only look at the "character", not the ASCII value of that character. And the "wholeMtches" don't enter into it. So that methodology is the wrong one.
on mouseUp
set the wholeMatches to "false"
if "a" = "A" then answer "Same"
set the wholeMatches to "true"
if "a" = "A" then answer "Same"
end mouseUp
A little knowledge is often a dangerous thing. Right out of the gate, know that if you limit a selection to, say, "a", LC will only look at the "character", not the ASCII value of that character. And the "wholeMtches" don't enter into it. So that methodology is the wrong one.
I wanted to make the point that one could compare the ASCII value of "a' with the ASCII value of "A", and get the fact that they are different. But not be able to compare "a" with "A" directly.
"MatchText" is a regex gadget, and though is likely the best solution, may be daunting for a new user.