mIRC Home    About    Download    Register    News    Help

Print Thread
#126779 04/08/05 10:29 PM
Joined: Dec 2002
Posts: 127
F
feud Offline OP
Vogon poet
OP Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
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?


------
deep down, i'm really superficial.
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.)

Joined: Dec 2002
Posts: 127
F
feud Offline OP
Vogon poet
OP Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
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.


------
deep down, i'm really superficial.
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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;

Joined: Aug 2005
Posts: 10
T
Pikka bird
Offline
Pikka bird
T
Joined: Aug 2005
Posts: 10
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++.

Joined: Nov 2005
Posts: 1
N
Mostly harmless
Offline
Mostly harmless
N
Joined: Nov 2005
Posts: 1
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

Joined: Jun 2004
Posts: 31
J
Ameglian cow
Offline
Ameglian cow
J
Joined: Jun 2004
Posts: 31
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.


Link Copied to Clipboard