Using Create
Posted: Mon Jul 02, 2007 9:25 pm
I am trying to use the CreateFile code that's in the help file,
but I get an error at line 1, syntax error.
also one on line 3, WriteString incorrect number of parameters.
I cut and pasted the code, so I'm a little confused.
Thanks,
Alan
but I get an error at line 1, syntax error.
also one on line 3, WriteString incorrect number of parameters.
I cut and pasted the code, so I'm a little confused.
Thanks,
Alan
Code: Select all
If CreateFile(0, "Text.txt") ; we create a new text file...
For a=1 To 10
WriteStringN(0, "Line "+Str(a)) ; we write 10 lines (each with 'end of line' character)
Next
For a=1 To 10
WriteString(0, "String"+Str(a)) ; and now we add 10 more strings on the same line (because there is no 'end of line' character)
Next
CloseFile(0) ; close the previously opened file and store the written data this way
Else
MessageRequester("Information","Can't create the file!")
EndIf