I have a button that adds text to an Edit control. I'd like the cursor to be placed at the end of the control's content to allow the user to continue typing in it right away.
Right now I'm navigating back to the control entering tab-keys, then entering a lot of down-keys and End. Like this:

start with your code, and remove the SendInput, {TAB 11}{DOWN 5}{END}
-> every time you hit the button, text gets appended and you loose the focus from EditBox.

put in GuiControl, Focus, Overig
-> when you hit the button, Editbox "keeps" the focus, but everything is selected

put in SendMessage, 0xB1, 5, 10,, ahk_id %Handle%
-> EM_SETSEL := 0x00B1 this allows to set the selection, for now character 5 .. 10
now play with the numbers, 0 = first character, 1 = second character, ..., -1 = last character
I found -2 to useful for putting the caret at the end, but with an empty selection.Beware: to use -2 for StartPosition is undocumented, or it is documented and I could not find it.
see EM_SETSEL

@wolf_II , thank you very much
very nice script , with goto line and see also cursor-position ( line / column )
maybe if you have already an editor script ... missing at least replace function
( but I'll be glad if you have this with all the functions below )

I woul'd like to make an editor with ahk
ini-file saves last used filename and cursor-position

Thank you wolf_II for the ahk-editor
I would never be able to write this , works fine

Try to add follows :
when start, opens last used/saved text-file and goto last cursor position
-add an ini-file , save file-name and cursor position ( I can see the position ( Line / Column ) from cursor in your script )
-Save / Save as ...

EDIT :
it works now , I'll present the script when really finished ...