mIRC Homepage

mIRC communicate with other (perl)processes

Posted By: SnakeByte

mIRC communicate with other (perl)processes - 29/05/04 09:20 AM

Well, to be honest, I pretty much hate the mIRC-script language, especially if the script exceeds more then 2 lines on-event-do-one-thing.

My problem is: My scripts are written in perl but I still want to use them together with mIRC (it's not a bad client, just the script-language isn't quite my thing).
To do so I found a Perl-Module wich sends commands to mIRC (I can use any mIRC-command from perl) but it doesn't work the other way.
But I still need some events from mIRC. So I thought I could use something like that:
on *:EVENT:*:*:/send-a-command-to-the-perl-script-function $1-

Well.. what I need is some sort of "send-a-command-to-the-perl-script-function"
Some people I've asked suggested a .dll but I don't know anything about .dlls so that's not an option for me. frown
If anyone has such a .dll please tell me.
If anyone knows about another way to let mIRC communicate with another process, please urgenlty tell me. (I thought about communication-files but that's again quite a code in mIRC-script frown and then again I would have to good old problem to synchronize such a communication crazy )

So long, and thanks in advance for anything usefull.

PS: I'm quite used to write c++ so if someone could teach me (give me a tutorial/good(!!!) documentation) how to write a .dll for mIRC I would do it.
Posted By: FiberOPtics

Re: mIRC communicate with other (perl)processes - 29/05/04 09:45 AM

especially if the script exceeds more then 2 lines on-event-do-one-thing.


I'm sorry I can't help you with writing dll's for mIRC but there are people here on the boards that can. Maybe you can use the Search function from this message board, I'm sure some interesting things will pop up. Same goes for Google. Maybe COM Objects can help you as well, don't know that for sure, but can't hurt to check it out: in mIRC /help Com objects

I quoted your sentence there because I am curious to know what you mean with that. If you mean that you don't like having more than 1 line of code on an event, then you can do this extremely easy by doing:

on *:EVENT:*:*: ProcessInput $target $1-

then simply create an alias which does all the work that you want it to, without having to code it on the event itsself.

alias ProcessInput {

Or do you mean that it is not possible to script more than 2 lines in an event?

on *:EVENT:*:*: {

Because of the braces you can put multiple commands into one event, no matter how many lines you use, as long as they are enclosed by the { } braces.

However as stated, I don't really know what you mean, so my apologies to you if this was not at all what you were saying.

Posted By: SergioNL

Re: mIRC communicate with other (perl)processes - 29/05/04 04:23 PM

maybe you can use command line inputs

aka: /run "c:\bla bla\script.pm" some extra inputs here

and then use stdio.dll if you want to hide the console (msdos) window
Posted By: SnakeByte

Re: mIRC communicate with other (perl)processes - 29/05/04 05:18 PM

but that would mean: one process for one input...
but I want one process which gets all the input..

So long.
Posted By: indiko

Re: mIRC communicate with other (perl)processes - 03/06/04 12:47 AM

What about using a socket for communication between your perl scripts and mIRC?

And about DLLs, I recently managed to create a DLL for mIRC with the GNU C Compiler (under Cygwin with mingw32 headers, for now). Due to lack of time I'm not able to write documentation for this, but if you like I could just give the whole folder to you, maybe that would help?
Also, there are quite some DLLs around of which you could get the source code as well.
© 2021 mIRC Discussion Forums