如题?

解决方案 »

  1.   

    你应该到vb版去提这个问题,它的代码是vb的好几个月以前琢磨过这东西,现在都忘了,有个专门可视化编这个的软件叫MASHPLAY还是什么来着,你可以用那个,很方便的
      

  2.   

    偶是用delphi来调用人物,
    然后想添加右键事件,
    再回调delphi写的函数,
    望大虾们赐教
      

  3.   

    小弟发现这个函数可以的
    OnCommand(Sender: TObject; const UserInput: IDispatch);但是在函数中不知道怎么从UserInput中获取到自己的信息,
    delphi中是否有某个类负责啊,像mfc中的COleDispatchDriver这个类的功能,
    望大虾指点
      

  4.   

    procedure TForm1.Button1Click(Sender: TObject); 
    begin 
      MonAgent.LanguageID:=$409; 
      MonAgent.Commands.Add('mailbox', 'Lancer Outlook Express', '(courriel),', true, true); 
      MonAgent.Commands.Add('notepad', 'Lancer le bloc notes', '(notepad)', true, true); 
    end;uses ShellAPI; procedure TForm1.Agent1Command(Sender: TObject; const UserInput: IDispatch); 
    var 
      CommandName : string;
    begin 
      CommandName := IAgentCtlUserInput(UserInput).Name; 
        if CommandName = 'notepad' then 
          ShellExecute(handle, 'open', 'notepad', nil, nil, SW_NORMAL)
        else if CommandName = 'mailbox' then 
          ShellExecute(handle, 'open', 'msimn', nil, nil, SW_NORMAL); 
    end;
      

  5.   

    楼上的兄弟:我运行后出现如下错误信息,请帮忙解决!谢谢!
       [Error] Unit1.pas(31): Undeclared identifier: 'LanguageID'
       [Error] Unit1.pas(32): Undeclared identifier: 'Commands'   [Error] Unit1.pas(33): Undeclared identifier: 'Commands'
      

  6.   

    >>'LanguageID' 不用也可!
    'Commands' 是對應到角色的, 你要大概用如下:
    Agent1.Characters.Character('Peedy').Commands.Add()而不是直接用 Agent1, 看你選用那個 Character
      

  7.   

    Agent1.Characters.Item['myagent'].Commands.Add('Hello','Hello',
     'Hello',TRUE,TRUE);
      

  8.   

    非常感谢aiirii(ari-爱的眼睛)老兄,
    当然也感谢各位的关注
    小弟无以为报,
    现将分数送上