Macro Scheduler 15




Writes text to a text file.  If the file does not exist it is created and the given line is written to it.  If it does exist, the line is written to the end of the file.  If the command was successful, result is set to zero.  A non zero result means an error occurred.


By default the text file is created with ANSI encoding.  To create a Unicode file set WLN_ENCODING to UNICODE.  For UTF8 set WLN_ENCODING to UTF8.  Any other value sets the encoding to ANSI.  WriteLn will then output Unicode.  If the file already exists WriteLn will detect the file's encoding and use that encoding when writing out the data.


To omit line break characters from the end of the line set WLN_NOCRLF to 1 before issuing the WriteLn command.  This will prevent subsequent text written with WriteLn appearing on a new line.


Abbreviation : WLN

See also: ReadLn, ReadFile





WriteLn>c:\temp\test.txt,result,%date% - Starting Macro