Ring a bell?

C

Csaba Gabor

Is there a way in Mozilla/Firefox to ring the bell? For example, in
Emacs or Notepad (on my Win XP Pro system) if you enter certain
shortcuts (e.g. ^g or ^q, respectively), you get a sound to let you
know that from the app's point of view, something unexpected happened.
Can I accomplish something similar in FF with javascript or via the
keyboard?

Thanks,
Csaba Gabor from Vienna
 
T

Thomas 'PointedEars' Lahn

Csaba said:
Is there a way in Mozilla/Firefox to ring the bell? For example, in
Emacs or Notepad (on my Win XP Pro system) if you enter certain
shortcuts (e.g. ^g or ^q, respectively),

With Emacs -- possible. I doubt that Notepad recognizes a BEL character
(that can be produced with C-g on standard input) to play the bell sound
through the internal PC speaker, but then I have not used Windows
eXPeriment much, and I never hat good reason to try this on Windows 2000.
you get a sound to let you know that from the app's point of view,
something unexpected happened.

Fortunately for the common user, no such unnerving thing usually happens
in a Web browser.
Can I accomplish something similar in FF with javascript or via the
keyboard?

You could play a media resource, and you would have to make sure that
speakers are powered on and their volume is set high enough for you to
hear.

You would need to make sure that an internal PC speaker is there, that it
is enabled and that its volume is set high enough for you to hear anyway.

Your question was rated: Straynge. [psf 4.15]


PointedEars
 
R

Randy Webb

Thomas 'PointedEars' Lahn said the following on 4/20/2006 9:51 AM:
Csaba Gabor wrote:


Fortunately for the common user, no such unnerving thing usually happens
in a Web browser.

I disagree. I can do some very unnerving things with sounds in IE. Even
without speakers. But I can't claim credit to it, Jim Ley was the first
place I saw the code.
You could play a media resource, and you would have to make sure that
speakers are powered on and their volume is set high enough for you to
hear.
You would need to make sure that an internal PC speaker is there, that it
is enabled and that its volume is set high enough for you to hear anyway.

Again, not true in IE at least which is a predominant part of the web
audience.

Your question was rated: Straynge. [psf 4.15]

Your answer was rated: Wrong.
 
C

Csaba Gabor

Randy said:
Thomas 'PointedEars' Lahn said the following on 4/20/2006 9:51 AM:

I disagree. I can do some very unnerving things with sounds in IE. Even
without speakers. But I can't claim credit to it, Jim Ley was the first
place I saw the code.

Randy, would you mind posting a link or a sample, please.

I just found a way:
On the keyboard I enter: alt,f,q,escape
Upon the press of the q, since it is not mapped to anything on my US
menu system, the bell is rung (the "thunk" sounding one). The escape
is for cleanup. Indeed, if I synthesize these events via javascript,
the bell is still rungm which is exactly what I wanted.

However, my synthesis is done within the GreaseMonkey chrome (that is
to say, GreaseMonkey.js). One of the bug fixes to FF 1.5.0.2 was that
it now allows keyboard events to be synthesized and thus place
characters into text controls
(https://bugzilla.mozilla.org/show_bug.cgi?id=303713). However,
control and alt combinations, along with movement keys (arrows, home,
end, etc) are not allowed so a web page creator cannot use the above
technique to his advantage.
Again, not true in IE at least which is a predominant part of the web
audience.

In addition, when IE displays an alert box, a (different sounding) bell
is rung.
Your question was rated: Straynge. [psf 4.15]

Your answer was rated: Wrong.
 
T

Thomas 'PointedEars' Lahn

Yes, it is true. Without speaker(s), without speaker(s) turned on or
without having its/their volume set high enough, you will not hear
anything.
In addition, when IE displays an alert box, a (different sounding) bell
is rung.

That is a Waveform _system sound_, usually _not_ the sound a BEL character
makes when played through the internal PC speaker (although there is a
driver for that). It has nothing to do with IE or not, but is set up
via the control panel (for example as Asterisk sound) for all Windows
applications; IE simply makes use of that setting. Obviously both of
you have no clue what you are talking about.


PointedEars
 
R

Randy Webb

Csaba Gabor said the following on 4/20/2006 1:01 PM:
Randy, would you mind posting a link or a sample, please.

<BODY>
<OBJECT id=DACtl CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D"
style="height:1;width:1;top:0;left:0;"></OBJECT>
<SCRIPT>
m = DACtl.MeterLibrary;
snd = m.SinSynth.Rate(800); // 800khz sine wave.
snd2=snd.RateAnim(m.Add(m.DANumber(3),m.Cos(m.localTime)));
snd3=snd.RateAnim(m.Div(m.Sin(m.localTime),m.Cos(m.localTime)));
DACtl.Sound = snd3;
// change snd to snd2 and snd3 for more interesting sounds.
DACtl.image = m.solidColorImage(m.White);
DACtl.Start();
</SCRIPT>
</Body>

<URL: http://jibbering.com/directanimation/sound.html >
 
R

Randy Webb

Thomas 'PointedEars' Lahn said the following on 4/20/2006 2:10 PM:
Yes, it is true.

No Thomas, it is not true.
Without speaker(s), without speaker(s) turned on or without having its/their
volume set high enough, you will not hear anything.

Nonsense.

<snipped utter nonsense from Thomas>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top