Tag: beep


Javascript Beep

August 4th, 2009 — 5:13am

This javascript method simply runs cmd by ActiveXObject to beep.

but it just works with internet explorer.

 
function myBeep() {
    try {
        var myObj = new ActiveXObject('WScript.Shell');
    }
    catch (ex) {
        alert("sorry just working with IE...");
    }
    //this will beep 2 times...
    myObj.Run("cmd /c @echo " +
                 "".padRight(" ", 2).replace(/ /gi, String.fromCharCode(7)), 7);
}
String.prototype.padRight = function(C, L) {
    var A = new String(this);
    while (A.length < L) { A = A + C; }
    return A.toString();
};
  • Facebook
  • Twitter
  • StumbleUpon
  • del.icio.us
  • Digg

Comment » | Javascript - Jquery

C# ile Beep

December 1st, 2008 — 10:36pm

Makinenin biplemesi hata uyarıları için kullanılabilir.

[DllImport("Kernel32.dll")]
public static extern bool Beep(UInt32 frequency, UInt32 duration);

Beep(500,100);

  • Facebook
  • Twitter
  • StumbleUpon
  • del.icio.us
  • Digg

Comment » | Csharp - C#

Back to top