Delphi 7.0 generated AgentObjects

zhaozj2021-02-16  47

Delphi 7.0 generated agentObjects_tlb.pas error Guide to MS Agent can't speak

The author is a Delphi beginner, the operating system is WinXP, the installation and development software is Delphi 7.0 Enterprise. I saw it in << Developing a master

>> No. 01 of the 41 page << 汪 Tan VB How to add an animation of the Elf role in the program >> After you want to implement it on Delphi

Tell the function. But I have encountered a lot of problems:

1. Add agent control in Delphi

Select Menu Component in Delphi IDE, IMPORT ACTIVEX Control - Select in the list box under Import ActiveX.

Microsoft Agent Control 2.0 (Version 2.0), click button install - click on the button OK in the Install dialog

- Click on the button yes in the Confirm dialog - Click the button OK in the dialog. At this point, the Agent control is added to the Delphi component board.

ActiveX page.

2, call an Agent control in Delphi

Built pROJECT1 (including form1) in Delphi IDE, place Agent1 on Form1 (Name property is Agent1), button1.

Private {private declarations} PEEDY: IAGENTCTLCHARACTEREX; Request1: iAgentCTLREQUEST;

procedure TForm1.FormShow (Sender: TObject); beginRequest1: = Agent1.Characters.Load ( 'Peedy', CurDir '/ Benoit.acs'); Peedy: = Agent1.Characters.Character ( 'Peedy'); Agent1.Connected: = True; peedy.moveto (300, 400, 12);

Procedure tform1.button1click (sender: TOBJECT); beginpeedy.languageID: = $ 409; // <---- Error is this sentence !!! peedy.show (0); peedy.play ('lookright'); peedy. Speak ('Hello, Wellcome To MS Agent Character World', '') end;

Whether you set the peedy.languageID to any value, you will report an error when running !!! Later, you will find this solution in the 9CBS discussion, but all solutions are not successful. Some people say that PEEDY.LANGUAGEID is set to 1033 (which is $ 409 (sixteen-entered) ten evolution) Some people say it is still not. I don't do it. Until there is a successful AgentObjects_TLB.PAS successfully when there is a list of Miky to read the Character action list. This is thus being inspired in Google Searching AgentObjects_tlb.pas results in cvs.sourceforge.net download an agentObjects_tlb.pas. Covered to x: / program files / borland / delphi7 / imports / agentObjects_tlb.pas. Then run the above code. Successful !! My Agent can finally speak. Haha !!!! Someone needs I can send AgentObjects_tlb.pas to him.

转载请注明原文地址:https://www.9cbs.com/read-22038.html

New Post(0)