ببینید من وقتی کد شما رو بصورت زیر تغییر میدم روی سیستم من برنامه بدرستی کار میکنه!


procedure TForm1.Button1Click(Sender: TObject);
begin
RobotAgent := TAgent.Create(self);
RobotAgent.Characters.Load('Merlin','Merlin.ac s');
with RobotAgent.Characters.Item['Merlin'] do
begin
// play('show') doesn't work! I don't exactly know why!!! But it just shows
// the charecter's icon in system tray.

// Show(0) works correctly, you can set the argumentr to 1 to change the
// way charecter appears
show(0);
Speak('Hi','');
end;
end;



procedure TForm1.Button2Click(Sender: TObject);
begin
if RobotAgent <> nil then
with RobotAgent.Characters.Item['Merlin'] do
begin
play('hide');
RobotAgent.Characters.Unload('Merlin');
end;
end;