i have a list of names and want to get a MsgBox, found when i type in the editbox at least 1 name from the list,
what im doing wrong ?
thanks!
Code: Select all
#SingleInstance, force
#NoEnv
txtlist = c:\namelist.txt
FileDelete, %txtlist%
FileAppend,
(
David
Mike
Jow
)
,%txtlist%
loop, read, %txtlist%
break
Gui Add, Edit, vUser1,
Gui, Add, Button,gCheck Default,check
Gui, Show
return
Check:
Gui,Submit,NoHide
if (User1 = A_LoopReadLine)
{
MsgBox, found
}
else
{
MsgBox, not found
}
return
GuiClose:
GuiEscape:
ExitApp