Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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?
Posted

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]
Posted

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

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
×
×
  • Create New...