"Type" issue?

Eric Chatonet eric.chatonet at sosmartsoftware.com
Mon May 9 05:38:02 EDT 2005


Hi John,

The type command can't work when the insertion point is not placed in a 
field.
So, you might try something like

select text of fld "Result"
type whichKey

Best regards,

Le 9 mai 05, à 11:31, John Ridge a écrit :

> 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...

Amicalement,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch
----------------------------------------------------------------
Web site		http://www.sosmartsoftware.com/
Email		eric.chatonet at sosmartsoftware.com/
Phone		33 (0)1 43 31 77 62
Mobile		33 (0)6 20 74 50 86
----------------------------------------------------------------



More information about the use-livecode mailing list