I don't understand quite what you're looking for, but here's an
AutoHotkey script to get you started.
Skrommel
;Search.ahk
#NoEnv
#SingleInstance,Force
Gui,Add,Edit,vfile x0 w200
Gui,Add,Button,gBROWSE x+5 w75,Browse...
Gui,Add,Edit,vsearch x0 w200
Gui,Add,Button,gSEARCH Default x+5 w75,Search
Gui,Add,Edit,vfind -Wrap -WantReturn -WantTab x0 w275 h275
Gui,Show
Return
BROWSE:
Gui,+OwnDialogs
FileSelectFile,filename,3,,Select a file, Text Documents (*.txt; *.xml; *.csv)
If filename=
Return
GuiControl,,file,%filename%
Return
SEARCH:
Gui,Submit,NoHide
IfNotExist,%file%
{
MsgBox,%file% doesn't exist!
Return
}
text=
found=0
Loop,read,%file%
{
If found=0
IfInString,A_LoopReadLine,%search%
found=1
If found=1
text=%text%%A_LoopReadLine%`n
}
GuiControl,,find,%text%
Return