> > The normal beep that you get when you do ^G is from the speaker inside
> > the case of your PC.  With a rackmount, you may be getting a beep, but
> > not be able to hear it since it's coming from the case in the rack (if
> > it even has a speaker).
> >
> > Apparently what you need to do is get the PC or whatever you are logging
> > in from to generate the beep rather than the MB speaker.
> >
> I can do that, by typing ^G in the console and hitting Enter.
>
> But I can't do it from a Perl program, running via wperl.

Interestingly, MessageBeep() doesn't work on my XP machine but Beep() does.

use strict;
use Win32::API;

my $msgBeep = Win32::API->new('user32', 'MessageBeep', 'N', 'N') or
die "Can't create a beep function: $^E\n";
my $beep    = Win32::API->new('kernel32', 'Beep', 'NN', 'N') or die
"Can't create a beep function: $^E\n";

$msgBeep->Call(-1);

$beep->Call(440, 1000);


There is also the Win32::Sound module.

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to