Skip to content

Instantly share code, notes, and snippets.

@infogulch
Created September 22, 2011 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infogulch/1235959 to your computer and use it in GitHub Desktop.
Save infogulch/1235959 to your computer and use it in GitHub Desktop.
AppendText(text) {
; appends text to the end without changing the entire contents or scrolling to the top
; thanks TheGood http://www.autohotkey.com/forum/topic56717.html
editHWND := ??
SendMessage, 0x000E, 0, 0,, ahk_id %editHWND% ;WM_GETTEXTLENGTH
SendMessage, 0x00B1, ErrorLevel, ErrorLevel,, ahk_id %editHWND% ;EM_SETSEL
SendMessage, 0x00C2, False, &text,, ahk_id %editHWND% ;EM_REPLACESEL
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment