Skip to content
Back to formatted view

Raw Message

Message-ID: <jtap21pbp7f2hrtfpqtfbfbrdbkt4c9hms@4ax.com>
Date: 2005-03-07T19:32:17Z
From: Duncan Murdoch
Subject: How can we ring a bell in Windows?
In-Reply-To: <Pine.LNX.4.61.0503071816280.7898@gannet.stats>

On Mon, 7 Mar 2005 18:18:37 +0000 (GMT), Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote :

>On Mon, 7 Mar 2005, Duncan Murdoch wrote:
>
>> On Tue, 8 Mar 2005 00:31:07 +0800 (CST), Lu Joseph
>> <c_joseph_lu at yahoo.com.tw> wrote :
>>
>>> Hello useRs,
>>>
>>> Is there a way to write code in R
>>> to ring a bell in Windows?
>>
>> If you load the tcltk package, then
>>
>> tkbell()
>>
>> will get you a bell on more platforms than just Windows.  If you don't
>> want to use tcltk, then you could call the Windows API function
>> MessageBeep from some C code, but I don't think we have a "bell" or
>> "beep" function in the standard R packages.
>
>But there is the ANSI "\a": cat("\n") works as expected, on all platforms.

Perhaps we should have a beep() or bell() function, to remind those of
us who never knew all the C escapes and wouldn't have guessed that the
ancient ASCII control codes still function.

I'll put it on my list...

Duncan Murdoch