mIRC Home    About    Download    Register    News    Help

Print Thread
#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.
#24058 14/05/03 12:22 AM
Joined: Apr 2003
Posts: 426
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)
#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.
#24060 14/05/03 12:26 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Post the amplayingcs alias.

#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.
#24062 14/05/03 12:34 AM
Joined: Dec 2002
Posts: 699
N
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

#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.
#24064 14/05/03 12:48 AM
Joined: May 2003
Posts: 730
S
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

#24065 14/05/03 12:51 AM
Joined: Dec 2002
Posts: 699
N
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?

#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.
#24067 14/05/03 01:01 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
u get "$#$"!# $null ??
what's did u mean

#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.
#24069 14/05/03 01:07 AM
Joined: May 2003
Posts: 730
S
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)

#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.
#24071 15/05/03 10:05 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
$iif($ampplayingcs,$ifmatch,Ekkert)


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

Link Copied to Clipboard