mIRC Homepage
Posted By: feud Creating (?) a DDE Client - 04/08/05 10:29 PM
I am designing a system that requires me to be able to send DDE messages to mIRC, preferably from a CLI program. I have been unable to create a DDE link directly to mIRC, and having an external program will allow me some flexibility with execution.

I apologize for the vagueness of this post, but what I want to be able to do is to be able to open a command.com console and type "c:\misc\dde\dde.exe <my message to mirc>" and have mIRC receive it.

Does anyone know of such a program?
Posted By: Online Re: Creating (?) a DDE Client - 04/08/05 11:50 PM
I'm not aware of any plain command-line utility that offers the functionality of mIRC's /dde command. I'm not a programmer either, so I can't help you write one. However, I have two links that may interest you.

If you're a VB programmer, check this post which will show you how to use DDE in VB. Otherwise, try my mIRC Batch script, which registers the .MIRC extension with Windows for use as a mIRC batch file.

To use my script, load it and type /mf on. This will enable you to execute any .MIRC file by double-clicking it, entering its name in the Start > Run dialog or launching it from a Windows batch file (.BAT) with the command START "file.mirc". The file itself should be nothing more than a series of mIRC commands, each on a separate line. (Tested on Windows 98.)
Posted By: feud Re: Creating (?) a DDE Client - 05/08/05 02:11 AM
thanks for the reply. i have since been able to create a DDE link (exactly what i said i couldn't do earlier), but am now having troubles with this connection. i would like to send a command to mIRC, but right now, all i can get it to do is /echo any of the text i send it. in perl, i am using: <code>Poke('filler', "<command>");</code> i read in the DDE help section of the mIRC helpfile that COMMAND would enable mIRC to execute the text i am sending it; but where do i specify the Topic?

sorry for changing the nature of the post.
Posted By: Online Re: Creating (?) a DDE Client - 06/08/05 08:29 PM
See this post. You want to do something like this:

Code:
  use Win32::DDE::Client;
 
  $Client = new Win32::DDE::Client ('[color:blue]mIRC[/color]', '[color:orange]COMMAND[/color]');
  die "Unable to initiate conversation" if $Client-&gt;Error;
 
  $cmd = '/echo -s Hello!';
  $Client-&gt;Poke ('[color:red]None[/color]', [color:green]$cmd[/color]) ||
        die "DDE poke failed";
 
  $Client-&gt;Disconnect;

(Code is based on the example in this manual page.)

mIRC is the DDE server name, COMMAND is the so-called topic, None is a placeholder for the item name (apparently you can't get away with an empty value), and $cmd is the data.

If you want mIRC to evaluate an identifier for you, use this code:

Code:
  use Win32::DDE::Client;
 
  $Client = new Win32::DDE::Client ('[color:blue]mIRC[/color]', '[color:orange]EVALUATE[/color]');
  die "Unable to initiate conversation" if $Client-&gt;Error;
 
  defined ($hesays = $Client-&gt;Request ('[color:red]$me[/color]')) ||
        die "DDE request failed";
 
  print 'Value of $me is ';
  print $hesays;
 
  $Client-&gt;Disconnect;
Posted By: TenchiKo89 Re: Creating (?) a DDE Client - 31/08/05 04:01 AM
You may also consider using SendMessage(), because mIRC's DDE server can be disabled, but SendMessage() will work if the DDE server is enabled or not. Not sure what language you're programming in, I use SendMessage with C++.
Posted By: Nephatiu Re: Creating (?) a DDE Client - 11/11/05 01:20 AM
Well, i just created a dde.exe in VB that works olmost exactly like the /dde command in mIRC, so it's not realy that hard,...

If anyone want it, mail me @ thomas.nico@gmail.com

Greetz. wink
Posted By: Jeroi Re: Creating (?) a DDE Client - 30/01/06 06:58 PM
Hey I am also interested in DDE client if that enables mIRC use from work or school... If anyone knows a good program that can connect with ip addres and use dde to chat on mIRC.
© mIRC Discussion Forums