dcsimg
June 23, 2018
Hot Topics:

Beginning MS Agent: Part 3

  • November 19, 2002
  • By Mack Male
  • Send Email »
  • More Articles »

Now that we have added the command to the character, the user can click on the menu item or speak a word or phrase to call the command. Now how do we use that to do something useful? We use the Agent1_Command procedure. The following procedure corresponds to the command we added above.

Private Sub Agent1_Command(ByVal UserInput as Object)Select Case UserInput.Name    Case "ACO"        Agent1.PropertySheet.Visible = TrueEnd SelectEnd Sub

As you can see, we have added the functionality to our command, "ACO". When the user clicks on the menu item or says one of the voice commands, the Advanced Character Options property sheet is shown. "UserInput" corresponds to the user either selecting the menu option or saying the voice command. The ".name" property is then updated with the name of the command the user called. Here is where naming your command is important. A simple Select structure allows us to easily add something for our command to do.





Page 3 of 6



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.

Sitemap

×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date