move cursor to the end of a line in a field

Bob Sneidar bobsneidar at
Wed Dec 23 15:30:58 EST 2020

off the top of my head, select char -1 to -1 of the focusedObject (or me if in the script of the field itself). Trouble is I am trying this in the field script itself and it doesn’t work, but if I enter select char -1 to -1 of field 7 in the message box it DOES work. 

Bob S

> On Dec 23, 2020, at 11:57 AM, Douglas A. Ruisaard via use-livecode <use-livecode at> wrote:
> I need to position the cursor at the end of the contents of a single line
> field.  This can be "manually" done by pressing the "END" key while the
> cursor is in that field.  I want to do that positioning programmatically...
> but ...
> I've searched all of the "...KeyDown" message options (e.g. commandKeyDown,
> controlKeyDown, optionKeyDown) and the other "key" message options (e.g.
> functionKey) and cannot find one which will tell me what the "END" key is...
> a Windows resource tells me it is "35".... 
> "rawKeyDown" tells me the raw key is 65367 ... but how do I "send" a rawkey
> value to the active field?  Or, ideally, can someone tell me how to
> "emulate" the "END" key and position the cursor at the end of the contents
> of a single line field?
> Likely simple but I just can't work it out.  Thanks in advance! 
> Douglas Ruisaard
>    Trilogy Software
>      (250) 573-3935
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list