mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
i can send data frm my vb app to my mirc

but how do i do it from mirc > vb ?

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
use com

/help com objects

btk

Last edited by billythekid; 09/12/06 08:18 PM.

billythekid
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
hmm, so com will let me send data to my exe from mirc?

do you know of any examples mate?

Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
Here's an example. I have a DLL that I wrote in VB whose assemby name was Weather and whose class was gweather. There was a function that took a string as a value. In the on START event, I have "comopen weather weather.gweather", and I wanted my DLL triggered on notices, so I have this:

Code:
on *:NOTICE:!weather*:*:{
  if ($com(weather)) {    
    var %zip = $2
    noop $com(weather,GetWeather,3,bstr,%zip)
    var %weather = $com(weather).result
    notice $nick %weather
    echo -a $nick %weather
  }
}


Let me know if you have any questions about how that works.

Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
but this is a VB .exe and i want to send data to this exe..

no point using an activex com dll if its an exe im dealing with

Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
Enable COM interoperability in your VB project and call the function in the EXE just as you would in my example.

Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
how do i enable it in vb?

sorry for being a newbie

Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
Go to the properties for the project, go to the Compile tab, and check Register for COM Interop.


Link Copied to Clipboard