Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Question Excel VBA macro automate Avaya CMS agent groups

  • Tyger0951
  • Visitor
  • Visitor
9 years 9 months ago #441 by Tyger0951
Replied by Tyger0951 on topic Excel VBA macro automate Avaya CMS agent groups
I'll have to try reaching directly out to Avaya then. I tried so many different ways to try to add them but no go either.

I tried each of the codes below to get the Agnet Group window to click/open the "Get Contents" button but i'd either get error or it does nothing.
Code:
op.doActon ("Modify") op.doAction ("Get Contents") op.doAction ("Get Content") op.doAction ("dbspace") b =cvsSrv.Dictionary.CreateOperation("Agent Groups - Get Contents", Op)


Only other thing i was think was maybe using send keys from the point that the Agnet Group name is already inputed. Use the send keys to tab over to the Get Contents button Click it. But then comes the problem of getting the agents ids from excel sheet to newly opened windoww (since can't use avaya scripts to fill it in )....

If you get anymore ideas please let me know and I'll do the same. :)

Please Log in or Create an account to join the conversation.

  • DoLifeLoop
  • Visitor
  • Visitor
8 years 7 months ago #553 by DoLifeLoop
Replied by DoLifeLoop on topic Excel VBA macro automate Avaya CMS agent groups
Did this ever get worked out?

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #554 by roller
I don't think there was a way, or at least one we could find via the Avaya Objects.

Please Log in or Create an account to join the conversation.

  • Tyger0951
  • Visitor
  • Visitor
8 years 7 months ago #555 by Tyger0951
Replied by Tyger0951 on topic Excel VBA macro automate Avaya CMS agent groups
I got it to work by using send keys

Code:
Sub AvayaGroups () For Each cell In wsMain.Range("B2:B5000") 'Looks in Each Cell in P Column If cell.Offset(0, -1).Value = Empty Then Exit For ' Stops if Blank Cell in Sup Column SupName = cell.Offset(0, -1).Value & " All" ' Adds All to Each Sup Name 'Exceptions If cell.Offset(0, -1).Value = "rt_all_agents" Or _ cell.Offset(0, -1).Value = "Team ReneMartinez" Then SupName = cell.Offset(0, -1).Value End If Op.SetProperty "grp_name", "" & SupName & "" 'Inputs GroupName cell.Copy 'Clicks Gets Contents Set objWSS = CreateObject("WScript.Shell") AppActivate ("Dictionary Agent Groups") Application.Wait Now + TimeValue("00:00:01") DoEvents objWSS.SendKeys "%a " Application.Wait Now + TimeValue("00:00:01") objWSS.SendKeys "G" objWSS.SendKeys "~" 'Add Agents If Not cell.Value = Empty Then Application.Wait Now + TimeValue("00:00:02") On Error Resume Next AppActivate ("Dictionary Agent Groups - Get Contents") Application.Wait Now + TimeValue("00:00:01") DoEvents objWSS.SendKeys "^v " objWSS.SendKeys "{BS}" objWSS.SendKeys "{BS}" objWSS.SendKeys "^a " Application.Wait Now + TimeValue("00:00:01") objWSS.SendKeys "~" Application.Wait Now + TimeValue("00:00:01") End If 'Removes Agents If Not cell.Offset(0, 1) = Empty Then cell.Offset(0, 1).Copy Application.Wait Now + TimeValue("00:00:02") AppActivate ("Dictionary Agent Groups - Get Contents") Application.Wait Now + TimeValue("00:00:01") DoEvents objWSS.SendKeys "^v " objWSS.SendKeys "{BS}" objWSS.SendKeys "{BS}" objWSS.SendKeys "^d " Application.Wait Now + TimeValue("00:00:01") End If Next cell ' Loops back to For Each Cell to change next name End SUb


Let me know if this helps.

Please Log in or Create an account to join the conversation.

  • Tyger0951
  • Visitor
  • Visitor
8 years 7 months ago #556 by Tyger0951
Replied by Tyger0951 on topic Excel VBA macro automate Avaya CMS agent groups
I was able to using SendKeys, Only Downside is can't use the keyboard or mouse during the code execution. I posted the code in the thread.

Please Log in or Create an account to join the conversation.

  • DoLifeLoop
  • Visitor
  • Visitor
8 years 7 months ago #557 by DoLifeLoop
Replied by DoLifeLoop on topic Excel VBA macro automate Avaya CMS agent groups
Doing some research, I found this... I haven't had a chance to play with it, or really look too in depth, but maybe it might help?

www.mrexcel.com/forum/excel-questions/53...-applications-2.html

Please Log in or Create an account to join the conversation.

Time to create page: 0.599 seconds
Powered by Kunena Forum