mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 3
N
noise98 Offline OP
Self-satisified door
OP Offline
Self-satisified door
N
Joined: Apr 2003
Posts: 3
I was using the SendMessage with CreateFileMapping to get some value from mirc, like $chan(0).

If I want to be able to get the value of $chan(0) of every server window (Multi-server support), I was trying to use /scon 1, /scon 2 ...
but scon doesn't seem to work well with SendMessage, mirc maybe considere the script function end when I first send the command.

What am I doing wrong ?

Doing an aliase in mirc:
alias test23 {
scon 2
%mynewvalue = $chan(0)
}

%mynewvalue is fill great

Doing SendMessage from outside:
//mData previously created with CreateFileMapping
wsprintf(mData, "scon 2");
SendMessage(mircHwnd, WM_USER+200,1,0L);
wsprintf(mData, "$chan(0)");
SendMessage(mircHwnd, WM_USER+201,1,0L);
//mData is fill with the result of $chan(0) but from the scon 1

Anyone can help please ? would be really appreciate...

Thanks

Joined: Dec 2002
Posts: 9
M
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Dec 2002
Posts: 9
My guess is mIRC processes each line sent seperatley, you might want to try putting both commands on 1 line.


Abort, Retry, Fail?
www.liek.net
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
mircscripts.org has snippets which allows use brackets with $scon/$scid .properties


Code:
//if ( khaled isgod ) echo yes | else echo no

Link Copied to Clipboard