Protect the typing

Ludovic Thébault ludovic.thebault at laposte.net
Fri Nov 15 15:38:05 CET 2013


Le 15 nov. 2013 à 14:52, dunbarx at aol.com a écrit :

> Hi,
> 
> 
> Type too fast? Can you post the script? How does the user make a new line? By hitting return?
> 


The user wrote gps coordinates, my script search the city, postcode, altitude from these coordinates, by a local database or by internet so it may take time.

I've just tested this solution, it seem to work :


on keydown thekey

   if "ecriture" is in the pendingmessages then wait for messages
   pass keydown
end keydown


on returninfield
... get the datas from the coordinates
send "ecriture tdatas" to me in 10 ## sent only if the coordinates changes
...
end returninfield


on ecriture tDatas
 put the selectedchunk into tposchunk
.... wrote the city, postcode et cie
 if tposchunk <> "" then select after char (word 4 of tposChunk) of fld "Table"	
end ecriture


More information about the use-livecode mailing list