I want to do a "beep" sound after error message

Hi Friends,

I want to do a “beep” sound after any error message,
I found this code to do these task in http://php.net/manual/en/ref.com.php

$com = new COM(“DynamicWrapper”);
$com->Register(“KERNEL32.DLL”, “Beep”, “i=ll”, “f=s”, “r=l”);
$com->Beep(5000, 100);

I put these code into a PHP module “sound_beep”, then I call it before the sc_error_message macro

sound_beep();
sc_error_message(“any message”);

when it is executed an error is displayed,

Fatal error: uncaught exception “com_exception” with message "failed to create COM object “Dinamyc Wraper” sintax no valid in … bla bla bla

What is the correct sintax or steps to do these code run ok ?

Aquiles

Re: I want to do a “beep” sound after error message

HI FRIENDS,

I FOUND A SOLUTION !!

I CREATE A NEW JAVASCRIPT MODULE AND CALL IT AS “beep_js”

var browser = navigator.appName;
if (browser==“Netscape”)
{
java.awt.Toolkit.getDefaultToolkit().beep();
}

THEN I CALL THIS METHOD WITH SC_AJAX_JAVASCRIPT MACRO AND !!!SOUND !!!

if ($sr <= " ")
{
sc_ajax_javascript(‘beep_js’);
sc_error_message(“Falta poner Rollo”);
}

THIS IS USEFUL TO CALL THE ATENTION OF USERS AFTER AN ERROR OCCURS !!

AQUILES

Re: I want to do a “beep” sound after error message

Good work Aquiles!
Thanks for sharing