Hello useRs, Is there a way to write code in R to ring a bell in Windows? Best regards, C. Joseph Lu Department of Statistics National Cheng-Kung University Tainan, Taiwan ROC _______________________________________________________________________
Lu Joseph <c_joseph_lu <at> yahoo.com.tw> writes: : : Hello useRs, : : Is there a way to write code in R : to ring a bell in Windows? : Here are two ways: cat("\7") system("sndrec32 /play /close c:/windows/media/ding.wav") The second way uses Windows Sound Recorder to play the ding.wav file on my XP system and which may or may exist in the same location on other versions of Windows.
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. Duncan Murdoch