The WinTask Scripting language contains functions that can aid in debugging problematic scripts being executed by
the e2e_appmon probe. Two functions in particular LogFile() and Comment() can help aid in troubleshooting issues
such as timing, checking to see if IF / ELSE condition blocks are executed, as well as check how long a statement
took to execute.
LogFile management function
The LogFile function forces the script to log each statement executed into the
Mainly used to trace in a text file all the statements executed by the script.
<filename>: name of the file where the statements executed after this function
are written. The extension must be .LOG if you want to be able to open the logfile
using File/Open Log menu. If the full path is not included in <filename>, the
file is created in the scripts current directory.
<type>: 1 for a full logfile, 0 for a limited logfile (only statements Comment are
written into the logfile).
<mode>: 1 to delete the logfile before writing, 0 to add the new statements at
the end of the logfile.
Logfile management function.
The Comment function writes a comment to the log file. (This inserts a comment into
the LogFile opened using the LogFile function for tracing
<comment_text>: string to write to the log file.
You must have already opened a log file before writing comments.
To write a complex string in the log file, you can concatenate multiple strings
using the + operator and you can use str$ function to transform an integer in a
string. For example:
Comment("The result for i index is: "+ str$(i))