Questo sito utilizza i cookie per migliorare servizi ed esperienza degli utenti. Se decidi di continuare la navigazione consideriamo che accetti il loro uso.

Panoramica Cerca Sopra
Dettagli del download
Logging information to a text Logging information to a text file
(0 voti)

LogMessage is a project designed to demonstrate how to log a text string to a file from a script. The button located in the main visualization window is used to start the LogMessageTest script that contains the LogMessage procedure. This procedure is defined within the Define script (also the functions for custom date and time formatting are defined within this script). Access to the file is done via an object named "Scripting.FileSystemObject" (the OpenTextFile method of this object is used). If this method is called with the filename as a parameter, a new object is created (the numerical parameter defines the opening method, 1 – read only, 2 – write, 8 – append, and the logical parameter defines whether the file should be created if it doesn't exist). Now, you can call the WriteLine method of this object and write an arbitrary text string to the file.

If the button located in the main visualization window is pressed at runtime, a new directory named Logs is created in the <Project> directory. The ScriptLog.txt file is created in this directory. The file contains lines with a current date, time, and example text string.

Informazioni

Versione:
Dimensione24.29 KB
Downloads2
Lingua
Licenza
Autore
Sito Web
Prezzo
Creato24-08-2015
Creato da
Modificato il24-08-2015
Modificato daroby

Solo gli utenti registrati e loggati possono scaricare questo file.

.

.