mIRC Home    About    Download    Register    News    Help

Print Thread
#121075 23/05/05 05:31 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
I would like the $?N feature to support things like 1-, for example:

Code:
//tokenize 32 1 2 3 | echo -a $?1-


The above would echo 1 2 3 instead of 1 as it currently does.

Code:
//tokenize 32 1 2 3 | echo -a $?1-2


The above would echo 1 2

I would also like it to support $0 and $*:

Code:
//tokenize 32 1 2 3 | echo -a $?0


The above would echo 3

Code:
//tokenize 32 1 2 3 | echo -a $?*


The above would echo
1
2
3


I know I could just use $?1 $2- but I'd prefer using $?1-


New username: hixxy
#121076 23/05/05 06:11 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
I can't think what $?* or $?0 would actually do. $?* couldn't be used anyway because that's already a valid identifier. Even for $?N-M, would that just ask for each parameter that wasn't present up to M?


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#121077 23/05/05 09:00 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
$?1-4 would do the same as $?4 except if $4 exists it will return $1-4


New username: hixxy
#121078 27/05/05 07:08 AM
Joined: Sep 2003
Posts: 149
S
Vogon poet
Offline
Vogon poet
S
Joined: Sep 2003
Posts: 149
Huh?

$? makes an input box... what would $?whatever do?

/me doesnt get it


mIRC 6.21 - Win XP Pro (SP2) - 2.4 Ghz - 1 GB Mem
irc.x-tab.org
#121079 27/05/05 07:34 AM
Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
from versions.txt:

26/03/95 - mIRC v2.8c etc...

15.Can now also do $$?1 or $?1 which means, try to fill this
value with parameter one if it exists. If parameter one doesnt exist,
ask for it.

That is, it's like:

$iif($1 != $null,$1,$?)

I have to assume that this is deprecated since it isn't in the mirc.hlp, but it still works, at least for now.


If I knew now what I will know then... maybe things will have been different...
#121080 27/05/05 09:10 AM
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
It is in the helpfile wink

From /help aliases:

Quote:
You can also do $$?1 or $?1 which means try to fill this value with parameter one if it exists. If parameter one doesnt exist, ask for it.


Saturn, QuakeNet staff
#121081 27/05/05 06:58 PM
Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
Woah. It took nearly 5 minutes to find it, even though I knew what page to look on, because it was in the middle of a paragraph that it didn't really seem to fit into, but you are correct. I had never seen it there before. I only knew it from the full versions.txt. Maybe $?N should be added to the index, and/or be given it's own paragraph and example. Just a thought.


If I knew now what I will know then... maybe things will have been different...
#121082 27/05/05 10:53 PM
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
I agree, although I personally don't consider the $?N construction to be that important, given the ease with which it can be scripted..


Saturn, QuakeNet staff
#121083 27/05/05 11:39 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Many of mIRC's identifiers are easily scripted with other identifiers, but since they were added I think they're all as important as each other.


New username: hixxy

Link Copied to Clipboard