Sign in to follow this  
Followers 0
Frankie Paul

Fileread Problem

5 posts in this topic

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

Share this post


Link to post
Share on other sites



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

that 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.


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

I believe this "one-liner" contains 2 questions:

1. yes

2. post what you have.

ok

test.au3


ƒrankie Paul

Share this post


Link to post
Share on other sites

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0