How to start this project...

Jim Ault JimAultWins at
Thu Oct 5 10:40:30 EDT 2006

Event looping and interactions with users has been discussed many times on
the list over the years.  You should try searching for words like
'keyboard', 'trap', 'rawkeydown' 'focus'  'Mac vs Windows vs Linux' and read
through the many techniques (and limitations)

Don't rule out the use of a 'dialog box' to limit user interactivity, if
that can fit into your scheme.  This option could provide event/message
simplicity you need.

Also, study the way messages work in Rev.  There may be messages sent by Rev
that will surprise you, but they will be one of the keys to harnessing user
actions. (closefield, enterinfield, keydown, rawkeydown, selection, etc)

There may be some example stacks that show these interactions and you can
see some of the gotchas and limitations.

This is not an area I spend any time working on, since all of my apps are
for me, or quite simplistic.

Hope you find all that you are looking for.

Jim Ault
Las Vegas

On 10/5/06 3:38 AM, "Adrian Williams" <adrian at> wrote:

> Just to clarify to everyone what I'm trying to do.
> Please look at a graphic explanation here...
> Tried Jim Ault's solution, but it works only on existing text
> already placed in the field. Any key pressed result in a message.
> I need a function that triggers at each keyDown.
> I will try Jacqueline/Martin's solution now, with a keyDown
> in the editedText field and a lookupchar function in the card.
> After this is achieved, at some point I then need to deal with the
> keyDown event when the User places the insertion point arbitrarily
> in the text to revise a word.
> Still plugging away...
> Adrian
> On 4 Oct 2006, at 00:53, Martin Blackman wrote:
>> Sounds like there is an error 'cos there is no selected text.  Try
>> putting a keydown handler similar to my/Jacque's recommendation into
>> the editedtext field script, and the lookupchar function into the card
>> or stack script (you can remove the button). Then chars should be
>> replaced as you type in editedtext. Keep on plugging away..
>> experimentation and the dictionary are helpful when things don't seem
>> to work.
>>> So... I made a new main Stack: lookup.rev,
>>> created three fields: editedText, input, output,
>>> and a button to run the script.
>>> ABC is first line of 'input' field.
>>> 123 is first line of output filed.
>>> in field editedText, ABC is entered.
>>> Button is pressed.
>>> Result: "Error in handler"
>>> Hint: function.
>>> This function should work in its own right - yes?
>>> Adrian
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
> _______________________________________
> Adrian Williams Design Ltd (trading as Club Type),
> 44 Mill Lane,
> Merstham,
> Redhill,
> Surrey RH1 3HQ, UK
> Telephone/Facsimile: 01737 643300
> dFax (computer reception): 0870 0515681
> International tel/fax (UK)+44 1737 643300
> International dFax:  (UK)+44 870 0515681
> Email: adrian at
> Website:
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:

More information about the Use-livecode mailing list