#Include GetChildHWND.ahk !z:: ActiveWindow:= WinExist("A") WinGetClass, class, A ControlGetFocus, FocusedControl, ahk_id %ActiveWindow% if not FocusedControl return c_id:=GetChildHWND(ActiveWindow,FocusedControl) ;------------Number of items---------------------------------------------------- SendMessage, 0x18b, 0, 0, %FocusedControl%, A n_of_it=%ErrorLevel% ;------------Part of string to create the choose-------------------------------- InputBox, s, Enter string to find and select, It will select all except this string,,,,,,,, ;------------DeSelect all------------------------------------------------------- SendMessage, 0x185, 0, -1, %FocusedControl%, A ;------------Select_all_with_string--------------------------------------------- ret=retrieval string VAR_address:= DllCall("CharNext", str, ret, UInt)-1 Loop, %n_of_it% { SendMessage, 0x189, a_index-1, VAR_address, %FocusedControl%, A StringGetPos, pos, ret, %s% if pos >= 0 SendMessage, 0x185, 1, a_index-1, %FocusedControl%, A } ;------------Inverse_Selection-------------------------------------------------- Loop, %n_of_it% { SendMessage, 0x187, a_index-1, 0, %FocusedControl%, A if ErrorLevel=1 SendMessage, 0x185, 0, a_index-1, %FocusedControl%, A else SendMessage, 0x185, 1, a_index-1, %FocusedControl%, A }