home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 February / PCWorld_2006-02_cd.bin / software / vyzkuste / triky / triky.exe / autoit-v3-setup.exe / Examples / FileWriteLine.au3 < prev    next >
Text File  |  2004-09-22  |  276b  |  14 lines

  1. $file = FileOpen("test.txt", 1)
  2.  
  3. ; Check if file opened for writing OK
  4. If $file = -1 Then
  5.     MsgBox(0, "Error", "Unable to open file.")
  6.     Exit
  7. EndIf
  8.  
  9. FileWriteLine($file, "Line1")
  10. FileWriteLine($file, "Line2" & @CRLF)
  11. FileWriteLine($file, "Line3")
  12.  
  13. FileClose($file)
  14.