Link to home
Start Free TrialLog in
Avatar of itailevitan
itailevitan

asked on

Special retrieval of a string from file <part 2>

Hello Tim and all others!
Thanks for the code but there is a slight problem:
- I am trying to read a "user_id" from a certain cookie text file
- I try to read a new line using your code - but it reads the whole file content into the string! (although if I open the cookie with Word - I see that there are new lines, so there must be new line characters in the cookie file, no?)
- As a result: I crash when trying to execute the command: Input #1, strLine2
(according to your code -see above)
- If I can find out how to advance the file pointer, that would help as well.
- To sum up: I need to skip the newline character(that I saw with Word) which appears after the string "user_id" that I am looking for and then skip a newline character, then read a string (representing the numeric id) which ends in the next newline character(this, again, I saw with Word)
- Please tell me what to do - 10'x
P.S. I miss C/C++ - this would have been over a long time ago...
although VB has its features...
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Something that might help speed up this code is the new split function in VB 6
Syntax

Split(expression[, delimiter[, limit[, compare]]])