use Win32::Sound;
&play_trouble;
Guys and Gals
I have the following little code which I am attempting to setup to notify my helpdesk in the case that I virus is detected on my network. Works great except everytime it plays it changes my speakers to only play from the left side. I have read the docs but cant figure it out. please help.
# Subroutine to call wav file to inform administrator of possible virus infection
sub play_trouble {
for ($count = 1; $count <= 2; $count++) {
($L, $R) = Win32::Sound::Volume();
if ( not defined Win32::Sound::Volume() ) {
die "Can't get volume: $!";}
Win32::Sound::Volume($L,$R);
Win32::Sound:
lay("D:\\scripts\\antivirus\\notification\\virus.wav");
Win32::Sound::Stop();
}
}
&play_trouble;
Guys and Gals
I have the following little code which I am attempting to setup to notify my helpdesk in the case that I virus is detected on my network. Works great except everytime it plays it changes my speakers to only play from the left side. I have read the docs but cant figure it out. please help.
# Subroutine to call wav file to inform administrator of possible virus infection
sub play_trouble {
for ($count = 1; $count <= 2; $count++) {
($L, $R) = Win32::Sound::Volume();
if ( not defined Win32::Sound::Volume() ) {
die "Can't get volume: $!";}
Win32::Sound::Volume($L,$R);
Win32::Sound:
Win32::Sound::Stop();
}
}