Support Board
Date/Time: Fri, 29 Nov 2024 04:50:11 +0000
Post From: ACSIL -> Open and write into a text file....
[2020-07-17 09:02:14] |
gfx2trade - Posts: 48 |
hi everyone, I am quite happy with this... void iMessageToFile(SCStudyInterfaceRef sc, SCString myText) {
int FileHandle; int myTextLength = myText.GetLength() + 2; // +2 to count for \\ unsigned int BytesWritten = 0; // Directory must exists SCString outputfile = "C:\\Trading\\Plateforme\\Log\\Sierra\\TextLogFile.txt"; sc.OpenFile(outputfile, n_ACSIL::FILE_MODE_OPEN_TO_APPEND, FileHandle); myText = myText + "\r\n"; sc.WriteFile(FileHandle, myText, myTextLength, &BytesWritten); sc.CloseFile(FileHandle); } hope it helps Date Time Of Last Edit: 2020-07-17 09:03:28
|