|
-
Aug 17th, 2007, 12:05 AM
#1
Thread Starter
New Member
[2005] Microsoft Agent Character
Hi, I'm fairly new to VB programming (but not new to programming in general). I am trying to figure out how to make a microsoft agent character do something, and then make the program wait until the character has finished doing it, and then execute more code. I have looked it up and found some sites that say how to do it, but it doesn't seem to be working. Can someone tell me what's wrong with this code:
agent.Show()
Code:
Dim controlRequest As Object
controlRequest = agent.Speak("Hello, I'm just wasting some time")
agent.Play("Idle2_2")
While controlRequest.Status <> 0
Thread.Sleep(250)
End While
Label1.Text = "It works!"
controlRequest.Status never equals 0 (Request complete), like it is supposed to. It is constantly 2 (Request pending)
How do I fix this?
Thanks,
WobbleU
-
Aug 17th, 2007, 08:05 AM
#2
Re: [2005] Microsoft Agent Character
Its because of the animation your are playing. The idle animations are an endless loop of the character sleeping or whatever. Its not like its doing a "Hello" wave and be done.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 17th, 2007, 07:16 PM
#3
Thread Starter
New Member
Re: [2005] Microsoft Agent Character
No it's not. controlRequest is assigned to agent.Speak("Hello..."), not the animation. I also changed it to "Wave" from "Idle2_2" just to make sure, and it had no effect.
WobbleU
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|