|
|
Joined: Jan 2003
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 20 |
how's about a $SoundCard which would return $TRUE or $FALSE if a soundcard is present or not.
this would be usefull in case where u have a script that plays sounds and there is not soundcard installed.
this way u could check for a soundcard before u play a sound.
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
Hoopy frood
Joined: Jul 2003
Posts: 742 |
use: //echo -a $SoundCard
alias SoundCard { var yas $dll(checksounddev.dll, soundcards, 0) | if (yas >= 1) { return $True } | else { return $false }}
http://www.mtec89.com/ftp/checksounddev.dll
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Hi, when setting a variable you need to put a % in front of the name, like %yas, but I assume you know this and simply forgot about it, no biggie.
alias SoundCard return $iif($dll(checksounddev.dll, soundcards, 0),$true,$false)
Greets
Last edited by FiberOPtics; 29/05/04 09:28 AM.
Gone.
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
Hoopy frood
Joined: Jul 2003
Posts: 742 |
i didnt "set" anything i used a local "var".
Last edited by MTec89; 29/05/04 04:48 PM.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
ROFL
And you think a local var doesn't need to be set?
You're confusing the word 'to set a variable' with mIRC's function /set
Whether its local or global, you're still setting a variable.
And the fact remains, local variables also need to be preceded by a %
But hey, don't take my word for it, open up your mIRC and put in the following aliases:
alias test1 { var yas = blabla echo -a yas }
alias test2 { var %yas = blabla echo -a %yas }
Results for the two aliases:
alias 1: echo's "yas" in other words, just the plain text word yas
alias 2: echo's "blabla" which is the contents of the variable %yas
I suggest you do /help local variables
lol
Gone.
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
Hoopy frood
Joined: Jul 2003
Posts: 742 |
:P well any way the dll still does what is needed regardless of my horrible mircscript
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Ah,
don't beat urself up, it's not "horrible mircscript", you simply made a mistake, no worries, everyone makes mistakes.
Cya
Gone.
|
|
|
|
Joined: May 2003
Posts: 79
Babel fish
|
Babel fish
Joined: May 2003
Posts: 79 |
/var is only a /set -l Here's the test:
alias set { echo -a $1- } //var %a = Data here
|
|
|
|
|
|