mIRC Home    About    Download    Register    News    Help

Print Thread
#211562 21/04/09 11:44 PM
Joined: Jul 2006
Posts: 4,180
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
I have the "show in active > whois" option enable in mirc option and if I make a /whois on an editbox window, it works as it should.
But when using something like //query $me | whois $me, the whois is done on the window where I've typed the commands, not the window that was active when the /whois was executed, even a timer does not help.
Any ideas about this ?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
This is a limitation in how commands like /whois and /say work. A temporary workaround would be editbox -n $me whois $me but it would destroy your editbox contents if the window was previously open (and had stuff in it)


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jul 2006
Posts: 4,180
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
A limitation ? I'm not sure how this could be limited, mirc should be aware about the real active window, look like an annoying limitation.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
mIRC is aware of the active window, it just isn't using it (by design).

The problem with /whois is two-fold:

1. "show in active" isn't really show in "active". It's really more of "show in the window the command was processed from", but this is naturally too long to put into a dialog. So from the start, we're not actually expecting /whois to be echoing to $active.

2. /whois has the same behaviour as /echo (without arguments), /say and /me. As I alluded to above, these commands aren't actually shorthand for "msg $active" or "describe $active", but rather they use the window id of where they were processed from. This is how "/timer 1 5 /say hi" will message the channel you typed it in regardless of whether you switch windows within that 5 seconds. This is the "limitation", or design flaw if you'd like, that keeps /whois from echo'ing to the active window and instead makes it use the window from which it was processed.



- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard