Jump to content
Sign in to follow this  
HARNOvHARNO

iniread max 47 ?

Recommended Posts

HARNOvHARNO

i use iniread to read a file and return the text from the file to the place i want when i press ctrl + w

but why dose it only return the first 47 letters, is there a way to return all the text from the text file?

and meybe letters like """""" !"#¤%&/()=?`@£${[]}| """"" ?

if i do a iniread and the read contains letters like those above i will get buged stuff out of the text.... meybe Fileread is better? i dont know how it works thou

i relly need my program to read this text without having to open notpad.

Share this post


Link to post
Share on other sites
normeus

ini is for ini formated files; Dont use it for other files.

this is from the help file, I PROMISE.

Example

$file = FileOpen("test.txt", 0)

; Check if file opened for reading OK

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")

Exit

EndIf

; Read in lines of text until the EOF is reached

While 1

$line = FileReadLine($file)

If @error = -1 Then ExitLoop

MsgBox(0, "Line read:", $line)

Wend

FileClose($file)

;I dont like to type so you'll have to settle for the Help Sample

Share this post


Link to post
Share on other sites
HARNOvHARNO

ini is for ini formated files; Dont use it for other files.

this is from the help file, I PROMISE.

Example

$file = FileOpen("test.txt", 0)

; Check if file opened for reading OK

If $file = -1 Then

    MsgBox(0, "Error", "Unable to open file.")

    Exit

EndIf

; Read in lines of text until the EOF is reached

While 1

    $line = FileReadLine($file)

    If @error = -1 Then ExitLoop

    MsgBox(0, "Line read:", $line)

Wend

FileClose($file)

;I dont like to type so you'll have to settle for the Help Sample

<{POST_SNAPBACK}>

im going to try it out, but isent that going to open my file in notepad or somthing?

Share this post


Link to post
Share on other sites
the_lord_mephy

No. FileOpen Doesn't do what you think. "Opening" a file is like setting it up to be read or overwritten.


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites
HARNOvHARNO

No. FileOpen Doesn't do what you think. "Opening" a file is like setting it up to be read or overwritten.

<{POST_SNAPBACK}>

this is cool as i just tested it, and fun.... atlast i made somthing usefull :idiot:

i need to chance the inereads in my source thou :D

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.