Without really having looked into the issue, I'd guess that this is just the way mIRC works: the Connection ID changes that your script performs, obviously only affect the CID for the running script, and not the active window overall. Therefore the CID must be local to the running script only, and mIRC apparently returns the global active CID (the one of the active window) when evaluating stuff for SendMessage calls, instead of taking the local CID value from the running script. That's not a bug, just a design decision (and, especially with stuff like whilefix.dll, probably a good one too)..

That said, why don't you just pass $cid to the DLL call in the first place? smile


Saturn, QuakeNet staff