hello, i am trying to create a log file (.txt) from a threshold applyed to the statistics objects, but it seems that the basic instructions don’t work (open “Path” for append as #1: ecc. ecc.). Someone can help me?
thanks
hello, i am trying to create a log file (.txt) from a threshold applyed to the statistics objects, but it seems that the basic instructions don’t work (open “Path” for append as #1: ecc. ecc.). Someone can help me?
thanks
You can search on google for tons of vb script examples.
This one worked for me.
But make sure TestCCPulse.txt already exists.
Dim objFSO, objTextFile
Dim sLogName
sLogName=“C:\TestCCPulse.txt”
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objTextFile = objFSO.OpenTextFile(sLogName,8,True)
objTextFile.Write (Date())
objTextFile.Write (" “)
objTextFile.Write (Time())
objTextFile.Write (” “)
objTextFile.Write (“Agent “)
objTextFile.Write (Threshold.CFGObjectID)
objTextFile.Write (” There are “)
objTextFile.Write (Threshold.StatValue)
objTextFile.Write (” Agents logged in now.”)
objTextFile.WriteBlankLines(2)
CCPulseNotifier.SetColor( Color.White )
objTextFile.Write (Date())
objTextFile.Write (” “)
objTextFile.Write (Time())
objTextFile.Write (” ")
objTextFile.Write (“Agent “)
objTextFile.Write (Threshold.CFGObjectID)
objTextFile.Write (” There are “)
objTextFile.Write (Threshold.StatValue)
objTextFile.Write (” Agents logged in now.”)
objTextFile.WriteBlankLines(2)
objTextFile.Close
Set objFSO = Nothing