Frankie Paul Posted March 15, 2006 Share Posted March 15, 2006 hoi,hoi all, i having trouble with a script i was to read 4 field from a file and take though values and write them to another spot the problem is there are lines of junk in between that i need to ignore and in some cases i only want to use one work noth the whole line is there anything i can can do to do this if you can please help thank you Frankie PAul rankie Paul Link to comment Share on other sites More sharing options...
Developers Jos Posted March 15, 2006 Developers Share Posted March 15, 2006 I believe this "one-liner" contains 2 questions: 1. yes 2. post what you have. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
seandisanti Posted March 15, 2006 Share Posted March 15, 2006 hoi,hoi all,i having trouble with a script i was to read 4 field from a file and take though values and write them to another spot the problem is there are lines of junk in between that i need to ignore and in some cases i only want to use one work noth the whole line is there anything i can can do to do this if you can please help thank you Frankie PAulthat is called parsing, just so you know, and it can be done very easily with the string manipulation functions in AutoIT. in the help file, go to the index tab, and just type string. you'll see alot of string functions to use parsing your data. also, because some level of parsing is needed in almost any I/O operations for data that is beyond the scripts control, you can find alot of examples of string manipulation and parsing in posts on this forum. Link to comment Share on other sites More sharing options...
Frankie Paul Posted March 15, 2006 Author Share Posted March 15, 2006 I believe this "one-liner" contains 2 questions:1. yes2. post what you have.oktest.au3 rankie Paul Link to comment Share on other sites More sharing options...
Developers Jos Posted March 15, 2006 Developers Share Posted March 15, 2006 something like this ? ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop Select Case StringLeft($line, 2) = "//" ; Case StringLeft($line, 4) = "Id = " ; EndSelect WEnd SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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