setting the insertion point
    J. Landman Gay 
    jacque at hyperactivesw.com
       
    Wed Apr 13 00:38:47 EDT 2011
    
    
  
On 4/12/11 11:20 PM, Nicolas Cueto wrote:
> Hello,
>
> Given this script:
>
>    put "123" into field "abc"
>    focus on field"abc"
>
> what additional script lines would cause the insertion point to be
> placed at the end of the line? or, say, after the number "2"?
See "select" in the dictionary (the command, not the keyword.) Examples 
pertaining to text, with my comments, are:
  select text of field ID 3 -- selects all text
  select after word 34 of field "myField" -- selects after a particular word
  select empty -- removes all selections
You can select after or before any text chunk. To place the cursor after 
"123" in your example:
  select after line 1 of fld "abc"
Or:
  select after char 3 of fld "abc"
Or to select after the number "2":
  select after char 2 of fld "abc"
Or:
  select after char offset("2",fld "abc") of fld "abc"
Or you can select "before" any of those:
  select before line 2 of fld "abc"
  select before char 3 of fld "abc"
  ... etc.
-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com
    
    
More information about the use-livecode
mailing list