mIRC Homepage
Posted By: Richard_B on INPUT in the server window? - 24/05/10 08:39 PM

Is there some way to process text input in the server window? For example: /join commands

I can see how to process channel windows, query windows, DCC chat windows, and DCC fserve windows, but not the server window?

Richard
Posted By: asdfasdf Re: on INPUT in the server window? - 24/05/10 10:01 PM
Only via on *:INPUT:*:if ($active == Status Window), I believe.
Posted By: Richard_B Re: on INPUT in the server window? - 25/05/10 03:32 PM
thanks, I'll try that... and let you know

Richard
Posted By: Richard_B Re: on INPUT in the server window? - 25/05/10 09:15 PM
good call, though this also works:

on *:TEXT:Status Window:{ <commands> }

Using your suggested method may, however, allow for some consolidation and reuse of similar segments of code.

Thanks!

Richard
Posted By: asdfasdf Re: on INPUT in the server window? - 25/05/10 10:35 PM
Ah, never knew, sorry. smile
Posted By: RusselB Re: on INPUT in the server window? - 26/05/10 05:50 AM
I fail to see how this could work, as the ON TEXT event is significantly different from the ON INPUT event.

In fact, it states in the help file under /help on text
Quote:
Note: You can't test out these events by typing text to yourself. They can only be initiated by someone else saying something in a channel or in a private message.


Additionally, the ON TEXT event has a matchtext section, which the ON INPUT event does not.

In fact, when I tried this
Code:
on *:TEXT:Status Window:{ echo -a 4 $1- }
on *:INPUT:"Status Window":{ echo -a 5 $1- }

and then entered the message TEST in a status window, I got the following response
Quote:
* You are not on a channel

Posted By: asdfasdf Re: on INPUT in the server window? - 26/05/10 06:50 AM
Oh, I believe he meant on INPUT and accidently typed on TEXT in his post, I didn't even realize.

And
Code:
on *:input:status window:echo -ag test: $1-

works well for me, without any quotation marks enclosing status window.
Posted By: sparta Re: on INPUT in the server window? - 25/07/10 04:42 PM
You can try this one:
Code:
on *:input:*: {
 if ($active = Status Window) || (@ iswm $active) || (!$1) { command }
}

You can also add a .halt in the end if you want the script to halt the text/command..

add the halt like this: { command | .halt }
Posted By: Horstl Re: on INPUT in the server window? - 25/07/10 05:10 PM
I'd rather use $window($active).type, returning "status", "channel", "query", "custom" and so on. smile
Posted By: STING Re: on INPUT in the server window? - 29/07/10 11:06 AM
Originally Posted By: sparta
You can try this one:
Code:
on *:input:*: {
 if ($active = Status Window) || (@ iswm $active) || (!$1) { command }
}

You can also add a .halt in the end if you want the script to halt the text/command..

add the halt like this: { command | .halt }


Just curious, is there a difference between halt & .halt?
Posted By: 5618 Re: on INPUT in the server window? - 29/07/10 11:25 AM
No. Prefixing commands with a . can make them silent, e.g. when using the timer command.
However, halt is already a silent command, so halt or .halt is the same.
Posted By: sparta Re: on INPUT in the server window? - 30/07/10 10:48 AM
forget the . , was a mistake from me :P
© mIRC Discussion Forums