mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2004
Posts: 22
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2004
Posts: 22
I'm using $com events to do things for MSN Messenger, like retreive the auth line and that, i have one running on a loop, just for testing purposes, and i noticed that you can't do anything whilst $com is in action. Was wondering if it was possible to have it so that whilst it is in opperations, that you can still opperate mIRC.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
is it the $com or the fact that your looping thats freezing up mirc?

Joined: Dec 2004
Posts: 22
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2004
Posts: 22
it's the $com event, i think it is because it's waiting for the string to come back, and whilst it waits, it locks up. Even if i just run it once, whilst it waits for the particular string, it locks up till it gets to that string. It takes approxmiately 1 second to get the particular string required, but within that 1 second, you can't do anything. running it on a loop, means that whilst in the loop, you can' do anything till the loop is done.

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
mIRC doesn't have COM events. COM events would allow us to use asynchronous callbacks through $com, this is not the case.

What you're referring to is $com waiting until it receives a value from the object. You can use $comcall to have mIRC call an alias when the object returns a value instead of waiting. This is the multi-threaded version of $com so there will be no freezing. Take a look at /help $comcall

Joined: Dec 2004
Posts: 22
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2004
Posts: 22
yea, i took a look at that, couldn't really get it opperating properly. I'll have another crack at it, and see what i come up with. Thanks. There is still a lot i need to learn. but com objects are something which i guess would be good to learn for the long run.

EDIT: Ok, second attempt, got $comcall working. Though it still does lock up mIRC a bit, but i guess that can't really be solved. It's all good, thanks for the aid.

Last edited by TheGateKeeper; 13/04/06 11:30 AM.
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
You're welcome smile

Yeah, COM has a difficult learning curve. The best advice I can give you is to use a language with great support for it like VB, VBscript, JScript (NOT Javascript), etc. These should help you grasp COM a bit better.

Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
*nods* JSCRIPT COM examples are really easy to convert to MSL as well so look on the net for examples and rebuild them in mIRC smile

COM events would be a totally awesome addition, i'm waiting on it for a couple of idea's. Extending my MSN Snippet is one of em too laugh.


$maybe
Joined: Dec 2004
Posts: 22
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2004
Posts: 22
yea, thanks for the help guys. I wish to continue to expand my programming knowledge. So picking on topics like this is good.

mIRC at present is great, but it has so much more potential, it's just a matter of seeing these new ideas implemented.


Link Copied to Clipboard