mIRC Home    About    Download    Register    News    Help

Print Thread
#84439 28/05/04 10:56 PM
Joined: Jan 2003
Posts: 20
K
Krayzee Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
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.

#84440 29/05/04 01:16 AM
Joined: Jul 2003
Posts: 742
Hoopy frood
Offline
Hoopy frood
Joined: Jul 2003
Posts: 742


use: //echo -a $SoundCard

Code:
alias SoundCard { var yas $dll(checksounddev.dll, soundcards, 0) | if (yas >= 1) { return $True } |  else { return $false }}
http://www.mtec89.com/ftp/checksounddev.dll


http://MTec89Net.com
irc.freenode.net #MTec89Net
#84441 29/05/04 09:24 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
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.
Code:
 
alias SoundCard return $iif($dll(checksounddev.dll, soundcards, 0),$true,$false) 


Greets

Last edited by FiberOPtics; 29/05/04 09:28 AM.

Gone.
#84442 29/05/04 04:46 PM
Joined: Jul 2003
Posts: 742
Hoopy frood
Offline
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.

http://MTec89Net.com
irc.freenode.net #MTec89Net
#84443 29/05/04 04:54 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
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.
#84444 29/05/04 04:57 PM
Joined: Jul 2003
Posts: 742
Hoopy frood
Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
:P well any way the dll still does what is needed regardless of my horrible mircscript


http://MTec89Net.com
irc.freenode.net #MTec89Net
#84445 29/05/04 05:05 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
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.
#84446 29/05/04 05:32 PM
Joined: May 2003
Posts: 79
A
Babel fish
Offline
Babel fish
A
Joined: May 2003
Posts: 79
/var is only a /set -l
Here's the test:

alias set { echo -a $1- }
//var %a = Data here


Link Copied to Clipboard