I can use C ++ biuder 5 to create an elf. However, when C ++ biuder 6 is used, the tagent is always undefined, please give me a copy of the Code that has been done, or remind me how to call it. Number of questions: 100, number of replies: 23
F117p on the first floor (take two steps. Do you take two steps ?) The result is that the tagent is installed first when the score is 0 at 22:29:30.
Find this in import active library and install
Top
On the second floor, slchen (stupid bird first fly) replied to 07:50:03, scoring 0. I installed it in cb5, but when debugging in cb6, I always said that tagent is not defined.
Top
On the third floor, ghostwy replied to 15:13:49, with a score of 0.
Top
On the 4th floor, Constantine replied to Constantine, which scored 70 at 15:39:15 on. First, confirm the installation, and then take a look at the code.
//---------------------------------------------------------------------------
# Include <VCL. h>
# Pragma hdrstop
# Include "unit1.h"
//---------------------------------------------------------------------------
# Pragma package (smart_init)
# Pragma link "agentobjects_ocx"
# Pragma resource "*. DFM"
Tform1 * form1;
//---------------------------------------------------------------------------
_ Fastcall tform1: tform1 (tcomponent * owner)
: Tform (owner)
{
Load = false;
}
//---------------------------------------------------------------------------
Void _ fastcall tform1: button1click (tobject * sender)
{
If (load = false)
{
If (opendialog1-> execute ())
{
Wact = "";
Act = Wact;
Char TMP [100];
Getwindowsdirectory (TMP, 100 );
Path = opendialog1-> filename;
Try
{
Agent1-> characters-> load (Act, PATH );
}
Catch (...)
{
Showmessage ("cannot load the wizard assistant normally! ");
Return;
}
Numan = agent1-> characters-> character (Act );
Numan-> show (0 );
Talk = "Hello, everyone. I am an genie assistant. If you have any questions, please feel free to ask me! ";
Numan-> speak (talk ,"");
Load = true;
}
}
Else
Showmessage ("the genie assistant has been loaded. Please do not load it again! ");
}
//---------------------------------------------------------------------------
Void _ fastcall tform1: button2click (tobject * sender)
{
If (load = true)
{
Talk = "Bye bye I'm leaving! ";
Numan-> speak (talk ,"");
Sleep (1000 );
Agent1-> characters-> unload (Act );
Load = false;
}
Else
Showmessage ("Please load the genie assistant first! ");
}
//---------------------------------------------------------------------------
Widestring tmpact [28] = {"acknowledge", "lookdown ",
"Sad", "alert", "lookdownblink", "Search", "announce ",
"Lookup", "Blink", "lookupblink", "confused ",
"Lookleft", "suggest", "congratulate", "lookleftblink ",
"Surprised", "decline", "lookright", "think ",
"Dontrecognize", "lookrightblink", "wave", "Explain ",
"Write", "pleased", "read", "Greet", "restpose "};
Void _ fastcall tform1: radiogroup1click (tobject * sender)
{
If (load = true)
{
BSTR active = tmpact [radiogroup1-> itemindex];
Try
{
Numan-> play (active );
Talk = "I am currently" + radiogroup1-> items-> strings [radiogroup1-> itemindex] +! ";
Numan-> speak (talk ,"");
}
Catch (...)
{
Talk = "sorry, no" + radiogroup1-> items-> strings [radiogroup1-> itemindex] +! ";
Numan-> speak (talk ,"");
}
}
Else
Showmessage ("Please load the genie assistant first! ");
}
//---------------------------------------------------------------------------
Void _ fastcall tform1: button3click (tobject * sender)
{
If (load = true)
{
Talk = "I want to hide it! ";
Numan-> speak (talk ,"");
Numan-> hide (0 );
}
Else
Showmessage ("Please load the genie assistant first! ");
}
//---------------------------------------------------------------------------
Void _ fastcall tform1: button4click (tobject * sender)
{
If (load = true)
{
Numan-> show (0 );
Talk = "hey, I'm coming again! ";
Numan-> speak (talk ,"");
}
Else
Showmessage ("Please load the genie assistant first! ");
}
//---------------------------------------------------------------------------
Top
On the 5th floor, slchen (stupid bird first fly) replied to 17:37:49 score 0 my mcrosoft agent control 2.0 was installed. After the installation, I put the control on the form, and no code was compiled in the past (cb6 ), however, this problem does not occur on cb5.
Find a solution !!!!!
Top
On the 6th floor, fanyufanyu replied with a score of 0 from 09:23:15, which may be related to your Windows version and patch. During the import of the active database, although sometimes the compilation reports an error, you can still work normally if you note these error statements with comments, I encountered this problem several times in bcb6. The last possibility is that the installation of the Microsoft role proxy is incorrect. Generally, the development version is the same as the release version, or a potential error may occur.
Top
Renfushen (laruence) on the 7 th floor replied to 21:49:43, scoring 0 up
Top
Renfushen (laruence) on the 8 th floor replied that he scored 0 at 08:36:33.
Top
Renfushen (laruence) on the 9th floor replied at 08:50:23, with a score of 0. I also want to know
Top
On the 10th floor, fanyufanyu replied with a score of 0 at 09:59:09,. Did your project be upgraded from cb5 to cb6? Maybe this is the problem, can the roles of other programs on your machine that use role proxies work normally? Such as office and anti-virus software.
Top
On the 11th floor, wg961423 (Bug) replied to 10:11:20, score 0. I also encountered a problem: After mcrosoft agent control 2.0 is installed, the control is placed on the form without any code. The control is compiled successfully, however, after some examples are written on the Internet, the link becomes faulty ([linker Error] unresolved external 'agentobjects _ TLB: iid_iagentctlcharacterex 'referenced from E: /BCB/agent/unit1.obj ).
What's the problem?
XP SP2 bcb6.0
Top
F117p on the 12th floor (take two steps. Do you take two steps ?) The score below-03:22:14 is that the bcb6 compilation connection passes.
Tvariant mV ("C: // windows // msagent // chars // Merlin. ACS ");
Iagentctlrequest * Pr = agent1-> characters-> load (widestring ("Merlin"). c_bstr (), MV );
// Iagentctlcharacter * character = agent1-> characters-> character (widestring ("Merlin "));
Iagentctlcharacterex * character =
(Iagentctlcharacterex *) agent1-> characters-> character (widestring ("Merlin"). c_bstr ());
Character-> show (tvariant (0 ));
Character-> moveTo (100,100, tvariant (2 ));
Character-> play (widestring ("Search "));
Different from bcb5, because of the conversion of the tvariant type and the BSTR problem, the compilation fails in bcb6. Maybe the bcb6 type check is more rigorous, right?
Top
On the 13th floor, slchen (stupid bird first fly) replied to 10:11:16,. The score is 0. Can you help me explain the usage of the above Code? I added them to formcreat, just like when I didn't add them, or the compilation Department passed, or a CPU dialog box. Press F9 and I will talk about the dialog box (translation ): the message in the project file is incorrect. Unfortunately, the image cannot be pasted.
Top
F117p on the 14th floor (take two steps. Do you take two steps ?) Reply to 15:06:47,. score 0. Try to uninstall the agent and reinstall it.
Or re-write a project, and then add the Lib in cbuilder6/import to the project.
The above code can be copied intact, such as The onclick event of a button.
Can be compiled and connected, and run normally to show the genie, that is the old man
Top
On the 15th floor, renfushen (laruence) replied that he scored 0 at 22:11:45. Can he write in detail? I used this control for the first time.
1. How to uninstall
2. "Even the Lib in cbuilder6/import is added to the project ."
Thank you for your help !!
Top
Return to wiseneuro (Spring Dance) on the 16th floor, score 0 at 23:06:36
Top
On the 17 th Floor, wiseneuro (Spring Dance) replied to 01:09:46, with a score of 0 to f117p (the blue-colored Fox). Every day, it is necessary to take a break to maintain life,
However, I would like to ask how to use the speak (tagvarient, tagvarient) method,
Character-> speak (widestring ("hello"), widestring (""); cannot be compiled.
Top
F117p on the 18 th floor (take two steps. Do you take two steps ?) Back to 11:49:56 score 0 re:
Change the sentence to character-> speak (tvariant ("hello"), tvariant (""));
Top
On the 19th floor, wiseneuro (Spring Dance) replied with a score of 0 from 23:06:12. Thank you. But why execute character-> speak (tvariant ("hello"), tvariant (""));
After that, only text is displayed, instead of being read out?
Top
F117p on the 20th floor (take two steps. Do you take two steps ?) Back to 00:39:06 score 0 because you have not installed the TTS pronunciation engine, you can download it on the M $ website.
Top
On the 21st floor, wiseneuro (Spring Dance) replied with a score of 0 from 22:46:59, but I still couldn't read it.
Top
F117p on the 22nd floor (take two steps. Do you take two steps ?) Back to 23:33:00 score 0 set the language sound in the control panel, two of the winners are simple Chinese and English. If the former is selected, Chinese characters can be read, and English words can be read with an English letter, if you select English, Chinese characters cannot be read.
Top
On the 23th floor, wiseneuro (Spring Dance) replied with a score of 0 from 23:48:13. Thank you. I found out that you need to set languageid = 0x0409 before using speak; // english
So I can read it. I'm so glad that the peedy is working on my desktop.
Feather, but also naughty to take out a pair of glasses to wear it... haha