" /> to create a log file with thresholds - Genesys CTI User Forum

Author Topic: to create a log file with thresholds  (Read 2600 times)

Stefano

  • Guest
to create a log file with thresholds
« on: September 09, 2008, 03:09:19 PM »
Advertisement
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

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: to create a log file with thresholds
« Reply #1 on: September 09, 2008, 08:01:51 PM »
You can search on google for tons of vb script examples.

Marked as best answer by on Today at 11:34:40 PM

Offline S

  • Full Member
  • ***
  • Posts: 135
  • Karma: 1
Re: to create a log file with thresholds
« Reply #2 on: September 10, 2008, 05:51:33 PM »
  • Undo Best Answer
  • 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