mIRC Home    About    Download    Register    News    Help

Print Thread
#98294 22/09/04 06:39 AM
Joined: Jun 2003
Posts: 4
J
JonXP Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Jun 2003
Posts: 4
I know this probably isn't possible, but I'm asking just in case...

Is there anyway for a COM object that has events to actually call back to mIRC?

e.g. If com object opened with /comopen blerm Foo.Bar has an event _OnBlee, is there any way to make a script respond to the _OnBlee event?


JonXP
KKPsi/Epsilon Theta
#98295 22/09/04 06:44 AM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
I wouldnt have thought so, not unless your actually causing the event to run, and as a result the output is returned..

i.e., if you told calc to add 1+1, and it outputted 2, you'd recieve it, however if you connected to calc and wanted to wait until someone run calc manually and typed 1+1 then trigger it, I doubt very much.

Unless of course the actual COM object supports some sort of buffering method, i.e. it outputs the data to a .txt file, then you'd use a timer and check if the file changes.. but few do.

Eamonn.

#98296 22/09/04 06:51 AM
Joined: Jun 2003
Posts: 4
J
JonXP Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Jun 2003
Posts: 4
Drat.

Kind of an important part of COM object programming, and it worried me when I didn't see it in the help file.

I wish there were some way to make it work...the VB wayis to call the object WithEvents, then just set up the events. e.g.

Code:
Private WithEvents FooBarEvents As Foo.Bar
Private Sub FooBarEvents_Blee( ByVal Cow as Long)
Print Cow
End Sub


JonXP
KKPsi/Epsilon Theta
#98297 22/09/04 10:32 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Agreed, COM event support would be nice, as would be the ability to call methods from objects in a collection (like $comval() does with properties).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard