Re: disable SyntaxQ beep
- To: mathgroup at smc.vnet.net
- Subject: [mg73793] Re: disable SyntaxQ beep
- From: albert <awnl at arcor.de>
- Date: Wed, 28 Feb 2007 04:40:58 -0500 (EST)
- References: <es12ho$nk4$1@smc.vnet.net>
Chris Chiasson wrote: > I usually turn off my Mathematica beep functionality, but today I > noticed that entering commands like SyntaxQ@"+" results in a beep > (when beeps are enabled). Unfortunately, I need to know if expressions > are proper Mathematica syntax without the beep sounding, even if the > user hasn't turned off the beep functionality. What is the best way to > do that? One thing you can try is to temporarily change the "WarningAction" setting in the FrontEnd-Option MessageOptions: wact = "WarningAction" /. Options[$FrontEnd, MessageOptions][[1,2]]; SetOptions[$FrontEnd, MessageOptions -> {"WarningAction" -> {}}]; SyntaxQ["+"]; SetOptions[$FrontEnd, MessageOptions -> {"WarningAction" -> wact}]; unfortunatly I don't know of any way to really undo this setting. The best I have found is to store the original value of the "WarningAction" of MessageOptions and reset it to what it was as shown above. But this leaves it explicitly set, that is it is marked as set in the option inspector, even when it just has the default value. Does anyone know how to do this better? hth, albert