Board index » delphi » Help: MSagent ActiveX and Delphi

Help: MSagent ActiveX and Delphi

Hi all,
I just found out about MSagents and would like to program them with Delphi
rather than Visual Basic.  MS has all the documentation for programming
them with VB.  

I have download MSAgent 2.0 and installed it.
I have downloaded the little critters in the right directories.
I have downmloaded the 'speech' program.

All I need right now is to initalize the little critters.
This is what I have but it doesn't work.
const
   datapath = 'genie.acs';
var
  Form1: TForm1;
  Genie  :   TAgent;
implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin

     Agent1.Characters.Load('Genie',datapath);
     Genie := Agent1.Create(Genie);

end;

procedure TForm1.Button1Click(Sender: TObject);
begin
     Genie.Show;
end;

thanks in advance
John K.
--
John Katic    e-mail address aq...@freenet.carleton.ca
              fax number     1-613-224-0805
-----------------------------------------------------------------

 

Re:Help: MSagent ActiveX and Delphi


Hi,

Quote
John Katic wrote:

> Hi all,
> I just found out about MSagents and would like to program them with Delphi
> rather than Visual Basic.  MS has all the documentation for programming
> them with VB.

Have a look at www.undu.com - they have a couple of good (and recent)
articles on MS Agent.  The first one is in the June archives, and there
is a second available from the main page.

--
George Sealy, PhD (geo...@arl.co.nz)
Animation Research Ltd.
Dunedin, NZ

Re:Help: MSagent ActiveX and Delphi


Quote
George Sealy (geo...@arl.co.nz) writes:
> Hi,

> John Katic wrote:

>> Hi all,
>> I just found out about MSagents and would like to program them with Delphi
>> rather than Visual Basic.  MS has all the documentation for programming
>> them with VB.

> Have a look at www.undu.com - they have a couple of good (and recent)
> articles on MS Agent.  The first one is in the June archives, and there
> is a second available from the main page.

> --
> George Sealy, PhD (geo...@arl.co.nz)
> Animation Research Ltd.
> Dunedin, NZ

Thanks George!!!  That's all I needed!

Here is a sample which now works!!!

const
   datapath = 'c:\windows\MSagent\chars\genie.acs';
var
  Form1: TForm1;

  a : IAgentCtlcharacterEx;
implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin

     Agent1.Characters.Load('Genie',datapath);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
    a := Agent1.Characters.Item ['Genie'] ;
    a.show (0);
end;

--
John Katic    e-mail address aq...@freenet.carleton.ca
              fax number     1-613-224-0805
-----------------------------------------------------------------

Other Threads