Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i get my PC to "Beep"

Status
Not open for further replies.

SaltyDuke

Programmer
Joined
Sep 18, 2002
Messages
140
Location
IE
hello

i'm writing a small Perl program for my SuSE Linux machine and would like to add in a feature where it makes the computer "beep" (using the internal speaker) at the user. i'm pretty sure there's a function in perl that will do this. anyone know what it is?

thanx in advance
TheSaltyDuke

[pipe]
 
The easiest way is:
Code:
print "\a";
This actually prints a ctrl-G or Bell character.

Hope that helps.
 
i'll give it a go.

thanx a million usige!!! :-)

[pipe]
 
unix
system("beep");
windows
#include <windows.h>
void main()
{
   for( int i=0; i<10; i++)
   {
       MessageBeep(MB_ICONEXCLAMATION);
       Sleep(200);
   }
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top