"Type" issue?
John Ridge
ridge11103 at btinternet.com
Mon May 9 05:31:58 EDT 2005
While playing around with numToChar and so on, I put the following silly
script into a card. It is intended to substitute random characters for the
one the user types into a text field on the card.
function randomInRange lowerLimit,upperLimit
return random(upperLimit - lowerLimit + 1) + lowerLimit - 1
end randomInRange
on keyDown whichKey
put randomInRange (120, 150)into fakeKey
put numtoChar (fakeKey)into whichKey
put whichKey
pass keyDown
end keyDown
Really silly, of course. As it stands, it simply displays the random
character in the message box. But if I change "put whichKey" to "type
whichKey", I get an error message - there is a problem with the function
handler. I'm puzzled - there wasn't a problem with the function handler a
moment ago. Why does the change from "put" to "type" generate one? Duh...
--
More information about the use-livecode
mailing list