TheBobynator Posted January 8, 2009 Share Posted January 8, 2009 hi, I want to search a word in a file and then I want to get the line from the seached word. Example: I search the word "hello" in the file "test.txt" and then I get the line from the search word. can someone help me, pls. THX Link to comment Share on other sites More sharing options...
FireFox Posted January 8, 2009 Share Posted January 8, 2009 @TheBobyNator Use _FileReadToArray Cheers, FireFox. Link to comment Share on other sites More sharing options...
TheBobynator Posted January 8, 2009 Author Share Posted January 8, 2009 can you write an example because the example from the helpfile I dont understand Link to comment Share on other sites More sharing options...
youknowwho4eva Posted January 8, 2009 Share Posted January 8, 2009 (edited) write up a script using the example. If it doesn't work post your code and we'll help you fix it. Edit: typo Edited January 8, 2009 by youknowwho4eva Giggity Link to comment Share on other sites More sharing options...
TheBobynator Posted January 8, 2009 Author Share Posted January 8, 2009 (edited) can you please help me, I dont know to make these Look: ___________________________test.txt cat dog mouse <====This is the file test.txt horse tiger ________________________________ .... ..... select case $button $getline = read the file test.txt and get the line which the word horse is writing guictrlsetdata($input,$getline) endselect ..... .... can you give me please a simple example Edited January 8, 2009 by TheBobynator Link to comment Share on other sites More sharing options...
FireFox Posted January 8, 2009 Share Posted January 8, 2009 @TheBobyNator We wont help you until you would take a look to help file ! Cheers, FireFox. Link to comment Share on other sites More sharing options...
TheBobynator Posted January 8, 2009 Author Share Posted January 8, 2009 I looked on the helpfile but I dont understand it Link to comment Share on other sites More sharing options...
FireFox Posted January 8, 2009 Share Posted January 8, 2009 @TheBobyNator Without the helpfile I would writte _FileReadToArray("yourfile.ext","mouse") ... no ? Cheers, FireFox. Link to comment Share on other sites More sharing options...
youknowwho4eva Posted January 8, 2009 Share Posted January 8, 2009 well firefox suggested filereadtoarray and I don't see that in your little sample. Giggity Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now