![]() Behind the scenes this triggers a ControlCommand event that fires a button click event. Here I will break down and show the logic for Bonzi telling a joke.įirstly, the user right-click's on Bonzi and click 'Joke'. txt file is used internally for simple tasks such as reciting the user's name, the initial date the program was initialized so Bonzi can make funny remarks, etc. The program periodically checks if the user has network connection and handles events accordingly.Ī simple. Otherwise, Bonzi informs the user of some kind of error. If successful, the result will either be recited by Bonzi or shown on a display form. The program then sends an HTTP request to various free APIs with the constructed query string. The phrases said by Bonzi is dependant on a "SpeechType" property which is changed based on what event is fired.Īfter the property is set, the program uses a "Speech" interface to dictate which phrases from the catalog are said.ĭepending on the event, a new Form might appear to prompt the user for information needed in a query string. Logicīonzi has a catalog of phrases he can say. The very last line is what gets Bonzi on the screen granted all the provided variables are correct. The last few lines simply position where Bonzi will appear (DoubleAgent only works with shorts numerically it seems). You can then see I use AgentName and AcsPath to tell DoubleAgent what to add its Characters dictionary. _(Convert.ToInt16( - 600),Ĭonvert.ToInt16( - 450), 500) īonzi's mechanism is primarily programmed using the AxControl() class. These are predetermined, and can be discovered using a tool like MASH. Lastly, TtsId is the value of the voice being used for Text-to-Speech (Bonzi's voice). ![]() acs file I found, AgentName is the name of the agent being used and has to be set to its actual name. These strings contain essentially all the data needed to get Bonzi up on the screen. Private const string AgentName = "Bonzi" private const string AcsPath = "C:\\agents\\Bonzi.acs" I will save a lot of the configuration and DoubleAgent usage for the previously mentioned tutorial, but just wanted to show the initial setup from the initial Form. acs file online (this file contains all graphics for the desktop companion". SetupĪfter DoubleAgent is installed and configured, I found Bonzi's. I just feel like WinForms work flow is way better in Visual Studio. I am programming entirely in MS Visual Studio 2022 over Rider (or any other C# IDE), simply due to preference. I was able to get it running using a simple Console app and WinForms so decided to go with WinForms. Initially, I had tried to use WPF, but wouldn't work with DoubleAgent. I am planning to make a tutorial on using DoubleAgent in the near future, as finding proper documentation/tutorials proved quite cumbersome, and want to create an easy-to-use guide for anyone interested in creating their own desktop buddies.īonzi Buddy is built using. DoubleAgent needs to be installed on the user's machine for this program to work, so I am hoping to resolve dependencies in Bonzi Buddy's first or second initial release. A lot of the API is synonymous with Microsoft Agent. How It Works? DoubleAgentĭoubleAgent is a library that essentially emulates Microsoft Agent to modern platforms. Initially, I had 'Jokes', 'Trivia' and 'Facts' hard-coded into the program, but this was cumbersome and needlessly time-consuming, so I opted to use free APIs to get the job done. Most of these features utilize API calls to get relevant data back. I've decided to program Bonzi in C# (the other supported languages of Double Agent are VB, C++, and JS(?)). The above is a list of features I am implementing in my first version of Bonzi Buddy (minus the voice commands, for now). Using this, I was able to essentially program my own version of Bonzi Buddy using his. This library essentially ported the old Microsoft Agent framework (the tech behind Clippy and Peedy the Parrot) to more modern platforms. During conception, I discovered a great library called Double Agent. A few months ago I started a small task of trying to port a spyware-free version of Bonzi Buddy (the little purple gorilla desktop buddy from the 2000s).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |