mIRC Home    About    Download    Register    News    Help

Print Thread
$iif #24057 14/05/03 12:17 AM
Joined: Apr 2003
Posts: 61
G
gaui Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Apr 2003
Posts: 61
I have...

theamp {
write -c D:\Private\Half-Life\cstrike\theamp.cfg say Now playing: $iif($ampplayingcs == $null,Ekkert,$ampplayingcs)
}

when i type //say $ampplayingcs I get $null but I don't get "Ekkert" from this $iif statement.

Please help.


__________________________
Curiosity killed the cat.
Re: $iif #24058 14/05/03 12:22 AM
Joined: Apr 2003
Posts: 426
neophyte Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
what is the context of this script?

you need to post just a tiny bit more so we know what it is precisly you want to do.

that said, /help $iif


--------
mIRC - fun for all the family (except grandma and grandpa)
Re: $iif #24059 14/05/03 12:23 AM
Joined: Apr 2003
Posts: 61
G
gaui Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Apr 2003
Posts: 61
When I type //say $ampplayingcs I GET $null but I don't get "Ekkert" from the $iif statement, which means the $iif statement isn't returning TRUE ("Ekkert") which it should do!


__________________________
Curiosity killed the cat.
Re: $iif #24060 14/05/03 12:26 AM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Post the amplayingcs alias.

Re: $iif #24061 14/05/03 12:29 AM
Joined: Apr 2003
Posts: 61
G
gaui Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Apr 2003
Posts: 61
alias ampplayingcs { return $replace($remove($nopath($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKFILENAME)),.mp3),_,$chr(32)) }


__________________________
Curiosity killed the cat.
Re: $iif #24062 14/05/03 12:34 AM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Hehe, I have NO idea what that dll returns so I cannot help there. smile

Re: $iif #24063 14/05/03 12:41 AM
Joined: Apr 2003
Posts: 61
G
gaui Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Apr 2003
Posts: 61
Nimue,

it returns $null if Winamp isn't running, then it returns the name of the song if Winamp is running.

the $iif should return "Ekkert" because $ampplayingcs returns $null and I check whether $ampplayingcs returns $null and it does, but not in the $iif smile


__________________________
Curiosity killed the cat.
Re: $iif #24064 14/05/03 12:48 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
are u sure it returns $null?
if it does then, $iif($ampplayingcs == $null,Ekkert,$ifmatch) must work

Re: $iif #24065 14/05/03 12:51 AM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
What does it write, when it's supposed to write ekkert?
Do you get any errors?

Re: $iif #24066 14/05/03 12:53 AM
Joined: Apr 2003
Posts: 61
G
gaui Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Apr 2003
Posts: 61
Ok, I tried...

//say $iif($ampplayingcs == $null,Null,Not null)

I got "Not null"...

But when I type //say $ampplayingcs I get "$#$"!# $null


__________________________
Curiosity killed the cat.
Re: $iif #24067 14/05/03 01:01 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
u get "$#$"!# $null ??
what's did u mean

Re: $iif #24068 14/05/03 01:02 AM
Joined: Apr 2003
Posts: 61
G
gaui Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Apr 2003
Posts: 61
I meant, "I get $null"... this #%"!$#"! was just my failed anger management.


__________________________
Curiosity killed the cat.
Re: $iif #24069 14/05/03 01:07 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
uh hehe,
did u get '$null' or did u get the VALUE of $null
if u get just '$null' as plain text use that:
$iif($ampplayingcs == $($null,0),Ekkert,$ampplayingcs)

Re: $iif #24070 14/05/03 01:09 AM
Joined: Apr 2003
Posts: 61
G
gaui Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Apr 2003
Posts: 61
ScatMan, you my friend, are a genius. Thanks a lot !


__________________________
Curiosity killed the cat.
Re: $iif #24071 15/05/03 10:05 PM
Joined: Feb 2003
Posts: 2,800
Raccoon Online
Hoopy frood
Online
Hoopy frood
Joined: Feb 2003
Posts: 2,800
$iif($ampplayingcs,$ifmatch,Ekkert)


Well. At least I won lunch.
Good philosophy, see good in bad, I like!