#Include GetChildHWND.ahk !z:: ;sel=1 select N string ;sel=0 deselect N string sel=1 ;Number to set the selection InputBox,N,Enter string number,selection of string in list box,,,,,,,,1 ActiveWindow:= WinExist("A") WinGetClass, class, A ControlGetFocus, FocusedControl, ahk_id %ActiveWindow% if not FocusedControl return c_id:=GetChildHWND(ActiveWindow,FocusedControl) SendMessage, 0x185, sel, N, %FocusedControl%, A ;MsgBox (Class=%class% Handle=%ActiveWindow%)(FC=%FocusedControl% Handle=%c_id%)