Re: [R] How can we ring a bell in Windows?

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue 08 Mar 2005 - 05:18:37 EST

On Mon, 7 Mar 2005, Duncan Murdoch wrote:

> On Tue, 8 Mar 2005 00:31:07 +0800 (CST), Lu Joseph
> <c_joseph_lu@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.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Mar 08 05:22:21 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:41 EST