mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 127
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
As above? I tried using
set %captive $comchan($1,1) but it didnt work. However, if i use
/echo -a $comchan($1,1), it still can "echo" the name of the channel to the window!

Joined: Dec 2002
Posts: 94
K
Babel fish
Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
set %captive $comchan($1,1)
seems to works fine for me, make sure $1 is there


Lets get dirty
Joined: Jan 2003
Posts: 127
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
I couldnt get it to work! As the %captive store the name of the channel, i want to use
/msg %captive watever message to send!

However, it always indicate invalied windows! What's is wrong?

Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
If I've read correctly from your last post, %captive has now stored the correct channel name...

in which case, if you want to manually reference that variable, you need to type:

//msg %captive bleh

other wise mIRC interperates %captive as plain text and tries to send a message to the channel "%captive" instead of what is in the variable.

so, if you want mIRC to evaluate the variable first, use "//"

Hope it helps?


Aubs.
cool

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
If you are trying to store $comchan($nick,1) to a variable in a script, you need to use an event that includes $nick (most of them do, but not all). If you wish to use $comchan( ) in the form you have it in the thread topic, then you need to supply the $1 yourself, such as in an alias called with a parameter.

on *:JOIN:#: echo -ti2 $chan * First common channel with $nick is $comchan($nick,1)

alias FirstChan return $comchan($1,1)
//echo -a $FirstChan(Hammer)


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard