mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2009
Posts: 74
K
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2009
Posts: 74
Some one asked me for a script that allows her to have people add things to a database with !add <message>, and a command that reads one off at random and posts it into the chat. In the script I included a command that lets her see all the messages people have added in a custom window. In running the alias, I check for the existance of a window for the chat messages, if it exists, it uses /clear to empty out the window before adding the messages to the window. She has a custom alias by the same name though, so /clear won't work. I tried using the ! prefix to make it use mIRC's standard command rather than the alias, but it still won't work. How can I get around the custom alias so that the command works to clear the custom window?

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Have you tried the /filter command? It has a -c switch that clears the output window/file before writing to it.

Joined: Mar 2009
Posts: 74
K
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2009
Posts: 74
That would work except the data is stored in a hash table. Not sure what possessed me to use that, but I suppose I like that it's a bit faster, and I've been using them a lot lately.

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
I'm surprised that /!clear wouldn't work...

But a quick-n-dirty solution would be closing and re-opening the window.

Joined: Mar 2009
Posts: 74
K
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2009
Posts: 74
Clever trick, I'll have to stick in a few variables to remember positioning of the window prior to closing it, otherwise any changes to window position get erased every time. Thanks for the trick, I guess I'll have to use that since the ! prefix doesn't seem to be working.


Link Copied to Clipboard