mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2006
Posts: 5
7
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
7
Joined: Mar 2006
Posts: 5
Is it somehow possible to use "#" as a normal character - i.e. not as current channel alias?

I am trying to use this part of script but neither "#" sign nor "current-channel-name" are used in outcome...

/say # &+ %var

I want to say #word where "word" is frequently changed variable (either number which is increased/decreased or word) - is it possible at all?

And second (I guess really newbie) question - when mIRC is connected to multiple servers (with multiple channels) how can one specify to what server direct commands/messages? To me it seems that currently when nothing is specified mIRC scripts are send to the server which was last active (in front).

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
You can try using one of these examples to get a #

$(#,0)

or

$chr(35)

BTW, # is called octothorpe, not "double cross". :tongue:

-genius_at_work

Joined: Feb 2006
Posts: 164
V
Vogon poet
Offline
Vogon poet
V
Joined: Feb 2006
Posts: 164
Most people i know call it a 'hash'

Joined: Mar 2006
Posts: 5
7
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
7
Joined: Mar 2006
Posts: 5
Thanks. Works fine.

Heh, I really haven't suspected that # is called octothorpe shocked

And I am realizing that double cross (I think some teacher told us that name in the past) is in fact something which looks like two plus signs :-)

Hmmm, what exactly does $(#,0)? I mean why is it necessary to have second parameter there? confused
Because when I use $? and input # it works confused

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
$(input,0) is short for $eval(input,0) meaning that whatever input is, it may not be evaluated.

When doing //echo -a #, the hash (#) will evaluate to either $null (nothing) if you don't issue this command on a channel, or it will echo the channel name where you issue this. By telling mIRC it shouldn't evaluate the #, it will echo that specific char instead.

Why it works with $? or $input? Because any text that you enter in an input box isn't evaluated.

To illustrate eval some more try this: //echo -a $me vs $($me,0)

You can also escape identifiers from evaluation by using the exclamation mark ! like this:

//echo -a $me vs $!me

or by simply doing something like this:

//echo -a $me vs $ $+ me


Gone.
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Same here.

Joined: Mar 2006
Posts: 5
7
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
7
Joined: Mar 2006
Posts: 5
Thank you. Got it laugh

Can you help with the second question? I guess I better should not start another thread...

When mIRC is connected to multiple servers/networks how can I specify to what server direct commands/messages? To me it seems that currently when nothing is specified mIRC scripts are send to the server which was last active (in front).

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
For you to be able to do this, you need to know about how multi-server scripting works in mIRC. Basically, you'll want to set a connection to the active one by using /scon or /scid, and then issue your commands like doing a message or whatever.

You can use my $findcid() alias which can help you tremendously with this. I've included extensive documentation, which should be enough for you to understand how to tackle this problem.


Gone.
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
I think it would be better to start a new thread since your question does not have anything to do with your first question. wink

I would suggestion you to read the help file regarding /scon & $activecid

/help /scon
/help $activecid


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Joined: Mar 2006
Posts: 5
7
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
7
Joined: Mar 2006
Posts: 5
Ok, thank you all, I'll look into it cool

(I haven't seen it in the mIRC help, sigh, a bit unfriendly wink )

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I have a small lib of /alias and $identifiers that i call alot, one is alias # return $chr(35) then i just use $# in place of #.


Link Copied to Clipboard