Home > database >  Ask how the project directory to generate a TXT file to save data
Ask how the project directory to generate a TXT file to save data

Time:09-18

For example, I run a piece of code

Wrong records the error information in the TXT file

To break records

Execute this code after automatically open the TXT documents

For help ~

CodePudding user response:

Try
A=1/0
The catch (runtimeerror e)
Messagebox (' ', um participant etmessage ())
End the try

CodePudding user response:

refer to the original poster AnYaYinXiaoHunHun response:
for example, I run a piece of code

Wrong records the error information in the TXT file

To break records

Execute this code after automatically open the TXT documents

Help ~


Suggest you don't use TXT, use the ini file to record more convenient, such as in the current directory to devolve a log ini, and then write it directly in a program can

SetProfileString (" the INI ", "Data", string (now (), "MM - DD YYYY - HH: MM: SS", "this is my first error Log")

CodePudding user response:

Should be:
SetProfileString (" the INI ", "Data", string (now (), "MM - DD YYYY - HH: MM: SS"), "this is my first error Log")
  • Related