0

第一:avaya cms用什么编程语言写的?

第二:我保存了带扩展名的cms脚本(.ACS),我想了解这个脚本来开始开发它。所以请检查下面的脚本,这个脚本实时导出数据,我想每 1 秒导出一次,但是当我执行这个代码时,它需要大约 20 秒,因为每次执行代码它都会开始连接到服务器并获取报告。那么如何在不每次都执行脚本的情况下自动每 1 秒自动连接到服务器并获取数据呢?

代码 :


Public Sub Main()

'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Real-Time: Designer: Split/Skill Report (All Queues Reports): Export Data"
'## Parameters.Add "Report: Real-Time: Designer: Split/Skill Report (All Queues Reports): Export Data","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "2","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Real-Time\Designer\Split/Skill Report (All Queues Reports)","_Report"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "-120","_Top"
'## Parameters.Add "525","_Left"
'## Parameters.Add "19440","_Width"
'## Parameters.Add "11760","_Height"
'## Parameters.Add "default","_TimeZone"
'## Parameters.Add "The report Real-Time\Designer\Split/Skill Report (All Queues Reports) was not found on ACD 1.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "3035;3099;3031;3033;3059;3089;3090","Splits/Skills"
'## Parameters.Add "3035;3099;3031;3033;3059;3089;3090","Split/Skill"
'## Parameters.Add "3035;3099;3031;3033;3059;3089;3090","Split/Skill(Agent)"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "*","_EndViews"
'## Parameters.Add "D:\xampp\htdocs\cms\real_time.txt","_Output"
'## Parameters.Add "59","_FldSep"
'## Parameters.Add "0","_TextDelim"
'## Parameters.Add "True","_NullToZero"
'## Parameters.Add "True","_Labels"
'## Parameters.Add "True","_DurSecs"

   On Error Resume Next

   cvsSrv.Reports.ACD = 1
   Set Info = cvsSrv.Reports.Reports("Real-Time\Designer\Split/Skill Report (All Queues Reports)")

   If Info Is Nothing Then
      If cvsSrv.Interactive Then
          MsgBox "The report Real-Time\Designer\Split/Skill Report (All Queues Reports) was not found on ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
      Else
          Set Log = CreateObject("ACSERR.cvsLog") 
          Log.AutoLogWrite "The report Real-Time\Designer\Split/Skill Report (All Queues Reports) was not found on ACD 1."
          Set Log = Nothing
      End If
   Else

       b = cvsSrv.Reports.CreateReport(Info,Rep)
       If b Then
    
          Rep.Window.Top = -120
          Rep.Window.Left = 525
          Rep.Window.Width = 19440
          Rep.Window.Height = 11760        
    
          Rep.TimeZone = "default"
    
          Rep.SetProperty "Splits/Skills","3035;3099;3031;3033;3059;3089;3090"
    
          Rep.SetProperty "Split/Skill","3035;3099;3031;3033;3059;3089;3090"
    
          Rep.SetProperty "Split/Skill(Agent)","3035;3099;3031;3033;3059;3089;3090"
    
          b = Rep.ExportData("D:\xampp\htdocs\cms\real_time.txt", 59, 0, True, True, True)

          Rep.Quit

              If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
          Set Rep = Nothing
       End If

   End If
   Set Info = Nothing
'## cvs_cmd_end

End Sub
4

1 回答 1

0

Avaya 脚本是用 VBScript 编写的。如果您熟悉 Office 中的 VBA,则代码非常相似。不幸的是,它们很慢而且有点蹩脚。使用 Avaya 脚本每 1 秒连接一次服务器是不可行的。您也许可以使用 Do...Loop,但我为 CMS 脚本编写自定义 VBS 的经验表明,即使是轻微错误也会导致 100% 的 CPU 使用率,而您的非工作代码将永远运行,直到您手动将其崩溃。

我可以说的一件事是,以 '## 开头的每一行或多或少都是关于脚本正在做什么的文档。vbscript 中的 ' 符号用于注释。实际代码在下面的部分。

Avaya 确实有数据库连接器,这可能会更好地满足您的需求。它们的速度要快得多,并且通常可以更好地使用该软件。我会说轮询数据库的查询比 macguyvering 脚本更有成效。

于 2020-12-17T15:56:43.617 回答