Home > Language Reference > LogFile and Clipboard Functions > Comment

Comment

The Comment function writes text to Log File.

Usage

Used to post a message to the log during a script execution.

Syntax

Comment(<message>)

Parameter

<message>, string, text to write.

Remarks

The name of the Log File is specified using LogFile function.

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))

See also

LogFile
StopLog
Logging Execution

Example

'Create a log file where only the Comment lines are written. Recreate one at each execution
LogFile("c:\wttest\my_log.txt",0,1)
Shell("notepad")
UseWindow("NOTEPAD.EXE|Edit|Untitled",1)
SendKeys("Hello<Enter>")
Comment("Hello was sent!)    'The string "Hello was sent!" is written into c:\wttest\my_log.txt