strange thing happening....file_save is not overwriting...help file says it should.
n = FILE_Save(APP_SCRIPTPATH & "test.txt", out_string)
the above is the lat line of the script function.
the help file says:
quote
If FileName already exists, FileName will be deleted before writing StringBuffer
/quote
that is not happening for me. the string is appended (added to) the file at the bottom.
I expected the file to be over written. the system pauses for 2 seconds during the file write, seemed odd for 10 lines of text, but not critical.
I was running in debug. i also tried just executing the script also.
I deleted the file. ran the script 2 times.
windows 10
--------------------------------------------------------------------------
made an example
calling "save_file" while inside include file will append the text to the file..
calling "save_file" from the main script file will overwrite the file
I commented the code in main file and ran the function 2 times, it adds to file
I un-commented code and commented function and ran 2 times. it over writes.
pausing in between to the 2 writes a few seconds.
code in the include file is inside function. code in main script file is not in a function.
USES "FILE"
Dim FileHandle As DWORD
Dim Status As DWORD
Dim TestString As String
Dim FileName As String
Dim sMsg As String
TestString = "1234567890ABCDEF" ' String to write to file
FileName = APP_SCRIPTPATH + "test.txt" ' Build filename
Status = FILE_SAVE(FileName, TestString) ' Save string to File
Bookmarks