Jump to content
Sign in to follow this  
yucatan

fileread/filereadline

Recommended Posts

hi when i have read a file i want to select/search to a word

b.v. when i get this when i read the file

hello=hello

test=test

autoit=autoit

c++=c++

i want to make that he select only the test:

so i want to select the secend word test

because when i read it something is there standing something different

is that a possebility with Select("test=******")

i wanne read the *****

how i can do this

Share this post


Link to post
Share on other sites

#include <file.au3>

Dim $aRecords

If Not _FileReadToArray("data.txt",$aRecords) Then
   MsgBox(4096,"Error", " Error reading TXT to Array     error:" & @error)
   Exit
EndIf

For $x = 1 to $aRecords[0]
    $data = StringSplit($aRecords[$x], '=')
    If Not @error Then
        If $data[1] = 'test' Then Msgbox(0,'Record test',$data[2])
    EndIf
Next

Share this post


Link to post
Share on other sites

hi it works for me now only one problem but how do i set it in a $

i want not to show a msgbox but i just want to because in $value how do i do this?

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  

×
×
  • Create New...