#Include GetChildHWND.ahk !z:: ;String for add s=Hi World! InputBox,s,Enter string to ,It sends the message to add a string to a list box,,,,,,,,%s% VAR_address:= DllCall("CharNext", str, s, UInt)-1 ActiveWindow:= WinExist("A") WinGetClass, class, A ControlGetFocus, FocusedControl, ahk_id %ActiveWindow% if not FocusedControl return c_id:=GetChildHWND(ActiveWindow,FocusedControl) SendMessage, 0x180, 0, VAR_address, %FocusedControl%, A ;MsgBox (Class=%class% Handle=%ActiveWindow%)(FC=%FocusedControl% Handle=%c_id%)