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.
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
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
i didnt "set" anything i used a local "var".
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
:P well any way the dll still does what is needed regardless of my horrible mircscript
Ah,
don't beat urself up, it's not "horrible mircscript", you simply made a mistake, no worries, everyone makes mistakes.
Cya
/var is only a /set -l
Here's the test:
alias set { echo -a $1- }
//var %a = Data here