Skip to main content

A Small HTML file using Microsoft Agent

<Html>
<Head>
 <Title>X-Mas Greetings ...Designed and Developed by M. Vadivel </Title>
</Head>
<Body bgcolor=black>
<!--
Sets or retrieves the URL of the component. If the value for version is set as -1 the component is downloaded from the server if the release date is later than the installation date on the client computer. If the compnent is installed on the client computer and the release date is the same or earlier than the installation date only an HTTP header transaction occurs.

The below line would take care of installing the agent control and the TTS engine if it is not already present in the end
user PC
-->

<OBJECT ID="AgentControl" width=0 height=0 CLASSID="CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F" CODEBASE="#VERSION=2,0,0,0">
</OBJECT>

<OBJECT ID="TruVoice" width=0 height=0 CLASSID="CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575" CODEBASE="#VERSION=6,0,0,0">
</OBJECT>

<Script language=VBScript>
Dim Genie
Sub window_OnLoad
  AgentControl.Connected = True ' needed for IE3
  AgentControl.Characters.Load "Genie", "http://agent.microsoft.com/agent2/chars/genie/genie.acf"
  Set Genie = AgentControl.Characters("Genie")
  Genie.LanguageID = &H0409 ' needed under some conditions (English)
  Genie.Get "state", "Showing, Speaking"
  Genie.Get "animation", "DoMagic2, DoMagic2Return"
  Genie.Show
  Genie.Get "state", "Hiding"

  Genie.Play "DoMagic2"
  Genie.Speak "Dear friends Merry Chrismas."
End Sub
</Script>

</Body>
</Html>

Till the above line save it as a HTML file. On firing that HTML you could see the Genie in action :)

There are lots of animation effects which comes along with Genie (BTW there are lots of other character as well like Merlin, Robbie, Peddy etc., You know what? we can create our own Character as well). Some of the other animations which I used while preparing a diwali greetings are as follows:

1. "Announce, AnnounceReturn"
2. "Explain, ExplainReturn"
3. "Pleased, PleasedReturn"
4. "Suggest, SuggestReturn"
5. "Think, ThinkReturn"
6. "Process, ProcessReturn"
7. "DoMagic1, DoMagic1Return"
8. "Wave, WaveReturn"

The complete list of possible animations of Genie is here. For creating your own character check this.

But when I was developing the application I wasn't aware about these links, so I downloaded the Character (Genie) and referenced it in a Visual Basic application and from it I got all the animation effects :) If anyone needs that diwali greetings which I developed using this Agent control do get in touch with me.

Comments

Popular posts from this blog

Script table as - ALTER TO is greyed out - SQL SERVER

One of my office colleague recently asked me why we are not able to generate ALTER Table script from SSMS. If we right click on the table and choose "Script Table As"  ALTER To option would be disabled or Greyed out. Is it a bug? No it isn't a bug. ALTER To is there to be used for generating modified script of Stored Procedure, Functions, Views, Triggers etc., and NOT for Tables. For generating ALTER Table script there is an work around. Right click on the table, choose "Modify" and enter into the design mode. Make what ever changes you want to make and WITHOUT saving it right click anywhere on the top half of the window (above Column properties) and choose "Generate Change Script". Please be advised that SQL Server would drop actually create a new table with modifications, move the data from the old table into it and then drop the old table. Sounds simple but assume you have a very large table for which you want to do this! Then it woul...

AWS fatal error: An error occurred (400) when calling the HeadObject operation: Bad Request

While using AWS and trying to copy a file from a S3 bucket to my EC2 instance ended up with this error message. Command Used: aws s3 cp s3://mybucketname/myfilename.html /var/www/html/ Error: fatal error: An error occurred (400) when calling the HeadObject operation: Bad Request The error goes off if we add the region information to the command statement. I am using Asia Pacific (Mumbai) so used ap-south-1 as the region name. Modified Command: aws s3 cp s3://mybucketname/myfilename.html /var/www/html/ --region ap-south-1

[Non Tech] Want to know the recipe for Omelette :)

Fed up with Bread - Jam and Curd Rice, today i wanted to eat Omelette. Interesting part is I wanted to cook it myself :) So in the first picture you see all the items which are needed for preparing an Omelette. When I had a closer look at the eggs I see that almost all the eggs are broken. But believe me when I bought it couple of days back it was in perfect condition! I was wondering whether the eggs have become rotten or pretty old to consume! I tried taking an egg and break it but couldn't break it at all :) Since I have kept in the freezer all the eggs have frozen and looked like a iron ball :) After trying for few minutes of trying i removed the shell of the egg and then kept that iron ball :) into a bowl and placed it within Oven. I heated it for 1 minute and checked. It melted only to a limit. So i just set it for another 2 minutes and checked it later. It has melted but the part of the egg white has become a Omelette :( I didn't leave it there. I took the bowl out of ...