mIRC Home    About    Download    Register    News    Help

Print Thread
#18367 06/04/03 08:40 PM
Joined: Apr 2003
Posts: 4
B
Barium Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Apr 2003
Posts: 4
I'm making a script with the intention of being able to talk through CTCP. Whenever a CTCP/CTCPREPLY has been sent to me it opens the message up in the messages dialog using this form: echo 1 -dbfmt CTCP from: < $nick > $1-

But when it opens a new "Messages" window the editbox starts with "/msg" and I want to be able to control that specific editbox, to forinstance changing it to "/ctcp $nick" but how do I do that?

Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
do you mean by default or it wont work if you type in /ctcp $nick whatever .. ?

Joined: Feb 2003
Posts: 47
G
Ameglian cow
Offline
Ameglian cow
G
Joined: Feb 2003
Posts: 47
You'll have to catch the input typed in the window and use that line for your ctcp call.

You can use on INPUT for this. Don't forget to halt the default action.

Joined: Apr 2003
Posts: 4
B
Barium Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Apr 2003
Posts: 4
by code, so whenever someone sends me a CTCP request it writes the request in the messages window as well as any replies, I've reached this far. But when ever someone writes a ctcp the editbox in the messages window gets the text: "/msg " by default. I want it to be "/ctcp nick" where nick is the nick of the last person ctcp'ing me.

Joined: Apr 2003
Posts: 4
B
Barium Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Apr 2003
Posts: 4
How do I use INPUT to catch it guesseyder? as far as I can read in the helpfile $input opens an inputbox in a new window, not catching what has been written in the messages editbox?

Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
When you recieve the ctcp, set a variable to store $nick. e.g. %ctcpnick
Code:
on *:input:*:if $active == Message Window { .timer 1 0 editbox -ap /ctcp [color:green]%ctcpnick[/color] }
on *:active:*:if $active == Message Window { editbox -ap /ctcp [color:green]%ctcpnick[/color] }

Joined: Apr 2003
Posts: 4
B
Barium Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Apr 2003
Posts: 4
it works, thank you very much smile


Link Copied to Clipboard