Support Board
Date/Time: Tue, 04 Nov 2025 11:41:10 +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  
             | 
        
