...control mIRC with DDE?

Author: Simon Grossenbacher
Homepage: http://www.swissdelphicenter.ch

Category: Objects/ActiveX

uses
  
DdeMan;

procedure mIRCDDE(Service, Topic, Cmd: string);
var
  
DDE: TDDEClientConv;
begin
  try
    
DDE := TDDEClientConv.Create(nil);
    DDE.SetLink(Service, Topic);
    DDE.OpenLink;
    DDE.PokeData(Topic, PChar(Cmd));
  finally
    
DDE.Free;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  
mIRCDDE('mIRC', 'COMMAND', '/say Hallo von SwissDelphiCenter.ch');
end;

 

printed from
www.swissdelphicenter.ch
developers knowledge base