Results 1 to 3 of 3

Thread: [2005] Microsoft Agent Character

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    1

    [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

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    1

    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
  •  



Click Here to Expand Forum to Full Width