#InstallKeybdHook WinWait, ahk_class TfrmFind IfWinActive, ahk_class TfrmFind { TClick = 0 SetTimer Stroke, 1 } Stroke: ;Based on code from http://www.autohotkey.com/forum/topic17614.html If (A_TimeIdlePhysical > 30 or A_TickCount-TClick < 125) Return MouseGetPos mX, mY If (mX0 = mX && mY0 = mY) { TClick := A_TickCount LiveSearch() } Else mX0 := mX, mY0 := mY Return LiveSearch() { ControlGetText, MyOutputVar, TdxPickEdit1 , Find text in file StringLen, MyStrLen, MyOutputVar if MyStrLen > 0 ControlSend, Find, {Enter}, Find text in file Return }