mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2010
Posts: 36
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2010
Posts: 36

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

Joined: Dec 2008
Posts: 95
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
Only via on *:INPUT:*:if ($active == Status Window), I believe.

Joined: May 2010
Posts: 36
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2010
Posts: 36
thanks, I'll try that... and let you know

Richard

Joined: May 2010
Posts: 36
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2010
Posts: 36
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

Joined: Dec 2008
Posts: 95
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
Ah, never knew, sorry. smile

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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


Joined: Dec 2008
Posts: 95
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
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.

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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 }


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
I'd rather use $window($active).type, returning "status", "channel", "query", "custom" and so on. smile

Joined: Dec 2002
Posts: 122
S
Vogon poet
Offline
Vogon poet
S
Joined: Dec 2002
Posts: 122
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?

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
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.

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
forget the . , was a mistake from me :P


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Link Copied to Clipboard