#Include GetChildHWND.ahk !z:: ;retrieve the selection state of an item. ;Number of item. InputBox, N, Enter number of item(zero-based index), It show the true about selection ActiveWindow:= WinExist("A") WinGetClass, class, A ControlGetFocus, FocusedControl, ahk_id %ActiveWindow% if not FocusedControl return c_id:=GetChildHWND(ActiveWindow,FocusedControl) SendMessage, 0x187, N, 0, %FocusedControl%, A ;MsgBox (Class=%class% Handle=%ActiveWindow%)(FC=%FocusedControl% Handle=%c_id%) MsgBox (Selected: NO=0 YES=1 -->=%ErrorLevel%)