Juvigy Posted September 11, 2014 Posted September 11, 2014 Hi Guys, Avaya is a call management system generating reports. I found a vba code i am trying to convert - i dont get any errors but i dont get any report/result generated as well. Here is the vba : expandcollapse popupPublic Sub Main() '## cvs_cmd_begin '## ID = 2001 '## Description = "Report: Historical: Designer: Report: Display" '## Parameters.Add "Report: Historical: Designer: Report","_Desc" '## Parameters.Add "Reports","_Catalog" '## Parameters.Add "4","_Action" '## Parameters.Add "0","_Quit" '## Parameters.Add "Historical\Designer\Report","_Report" '## Parameters.Add "1","_ACD" '## Parameters.Add "-105","_Top" '## Parameters.Add "3630","_Left" '## Parameters.Add "19440","_Width" '## Parameters.Add "15150","_Height" '## Parameters.Add "default","_TimeZone" '## Parameters.Add "The report Historical\Designer\Report was not found on ACD 1.","_ReportNotFound" '## Parameters.Add "*","_BeginProperties" '## Parameters.Add "66;6","Skills" '## Parameters.Add "5/26/2013-5/31/2013","Dates" '## Parameters.Add "*","_EndProperties" '## Parameters.Add "*","_BeginViews" '## Parameters.Add "*","_EndViews" On Error Resume Next cvsSrv.Reports.ACD = 1 Set Info = cvsSrv.Reports.Reports("Historical\Designer\Report") If Info Is Nothing Then If cvsSrv.Interactive Then MsgBox "The report Historical\Designer\Report was not found", vbCritical Or vbOKOnly, "Avaya CMS Supervisor" Else Set Log = CreateObject("ACSERR.cvsLog") Log.AutoLogWrite "The report Historical\Designer\Report was not found." Set Log = Nothing End If Else b = cvsSrv.Reports.CreateReport(Info,Rep) If b Then Rep.Window.Top = -105 Rep.Window.Left = 3630 Rep.Window.Width = 19440 Rep.Window.Height = 15150 Rep.TimeZone = "default" Rep.SetProperty "Skills","66;67" Rep.SetProperty "Dates","5/26/2013-5/31/2013" b = Rep.Run 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 Here is what i got so far: $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ;~ $cvsApp = ObjCreate("ACSUP.cvsApplication") $cvsConn = ObjCreate("ACSCN.cvsConnection") $cvsSrv = ObjCreate("ACSUPSRV.cvsServer") $Rep = ObjCreate("ACSREP.cvsReport") $cvsConn.Login("user", "pass", "IP", "ENU") $cvsSrv.Reports.ACD = 1 $cvsSrv.Reports.Reports("Historical\Designer\Report") $cvsSrv.Reports.CreateReport($Info,$Rep) $Rep.TimeZone = "default" $Rep.SetProperty("Skills","66;67") $Rep.SetProperty("Dates","8/1/2014-8/30/2014") $Rep.Run $Rep.ExportData("c:\test.txt", 44, 0, True, False, True) $Rep.PrintReport $Rep.ExportData("c:\test.txt", 44, 0, True, False, True) $cvsConn.Logout $cvsConn.Disconnect $Rep = 0 $Info = 0 Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Local $err = $oMyError.number If $err = 0 Then $err = -1 $g_eventerror = $err ; to check for after this function returns Endfunc I have tried several things , searching in the net and etc. Have anyone worked with Avaya or managed to do something about this ?
Moderators JLogan3o13 Posted September 11, 2014 Moderators Posted September 11, 2014 On 9/11/2014 at 7:45 AM, Juvigy said: i dont get any errors but i dont get any report/result generated as well How would you get any errors, since there isn't a stitch of error checking in your script? I see at least half a dozen points where you could add error checking to narrow down where there script is failing. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Juvigy Posted September 11, 2014 Author Posted September 11, 2014 i had in my tests - i checked all objects with ISOBJ function. Also i have the MyErrFunc() as an error handler. As i said - i dont get any errors. What else can i add ?
samibb Posted August 31, 2020 Posted August 31, 2020 Dear Jlogan i am using AutoIT and i would connect to Ayaya CMS Supervisor and get real time report > i don't know how . can you help please
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now