|
|
gaui
|
gaui
|
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.
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
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
|
|
|
|
gaui
|
gaui
|
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!
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
Post the amplayingcs alias.
|
|
|
|
gaui
|
gaui
|
alias ampplayingcs { return $replace($remove($nopath($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKFILENAME)),.mp3),_,$chr(32)) }
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
Hehe, I have NO idea what that dll returns so I cannot help there.
|
|
|
|
gaui
|
gaui
|
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
|
|
|
|
ScatMan
|
ScatMan
|
are u sure it returns $null? if it does then, $iif($ampplayingcs == $null,Ekkert,$ifmatch) must work
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
What does it write, when it's supposed to write ekkert? Do you get any errors?
|
|
|
|
gaui
|
gaui
|
Ok, I tried...
//say $iif($ampplayingcs == $null,Null,Not null)
I got "Not null"...
But when I type //say $ampplayingcs I get "$#$"!# $null
|
|
|
|
ScatMan
|
ScatMan
|
u get "$#$"!# $null ?? what's did u mean
|
|
|
|
gaui
|
gaui
|
I meant, "I get $null"... this #%"!$#"! was just my failed anger management.
|
|
|
|
ScatMan
|
ScatMan
|
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)
|
|
|
|
gaui
|
gaui
|
ScatMan, you my friend, are a genius. Thanks a lot !
|
|
|
|
Joined: Feb 2003
Posts: 2,737
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,737 |
$iif($ampplayingcs,$ifmatch,Ekkert)
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
|
|