1.

Solve : Vb6 scanning .txt files for a word...?

Answer»

ok im MAKING a program... very simple purpose but im stumped on this part of code.
its pretty much like the relationship between teacher and PUPIL, the computer user being the teacher. and you teach the program THINGS, and if it doesnt recognize a word you say, then it asks about it.

Code: [Select]Open App.Path & "/preprogrammeddata/known.txt" For Input As #1
Open App.Path & "/taughtdata/taught.txt" For Input As #2known.txt is the pre-programed/dictionary file
taught.txt is the words/meanings that it gets taught.

how can i make the program scan known.txt for a word, just a single word, put in textbox1, and if it doesnt recognize it, to ask about it in chat and, once told, put it in the taught.txt file?

its the If statement that is stumping me... i dont know how to write it.
but remember that known.txt has more than one word in it, in alphabetical order, so it needs to scan it... and that is... lets just say advanced for the programs i've been doing.

thanks in advance
~Liam B.If Instr(String to SEARCH, "word being SEARCHED for") then do_whatever()



Discussion

No Comment Found