finding multiple keystrokes
briany at qldlearning.com
Thu May 4 00:27:34 EDT 2006
How about something along the lines of:
constant keyThreshold = 500
local findString, lastKeyTime
on keydown key
if (lastKeyTime is empty) OR (the milliseconds - lastKeyTime >
put key into findString
put key after findString
find normal findString in field "list"
put the milliseconds into lastKeyTime
This is top-of-the-head untested, but the idea would be to track the
time at which a key was pressed, and if another key is pressed quickly
enough (with the keyThreshold), append that key to the find string
instead of replacing it.
> the following will select, in a list field, only the first item that
> starts with the first pressed key:
> on keydown key
> find normal key in field "list"
> end keydown
> but if field 'list' contains:
> how can I make it so that the third line will be selected if the user
> presses "at"?
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode