0

I have a script that uses Balloon Tips to alert users to progress. However, by default balloon tips make an annoying noise. In a perfect world I would be able to set my balloon tips to be silent, while leaving any other alerts to behave in the normal way. But I don't see anything along the lines of $balloontip.balloonTipMute=$true.

My second thought was to mute the machine for the duration of my test, and I found this thread that seems to be what I want. However, the Core Audio API approach Alexandre mentions is not working for me, and the simple SendKeys approach doesn't work if the machine is already muted, as in that case I turn sound on right before proceeding to annoy the snot out of the user.

So, starting from the bottom, is there a way in PowerShell to see if audio is already muted, so I can toggle only if needed? Or, can someone verify that the Core Audio API approach really should work from Windows 7 on, and I need to start looking for a mistake? Or best yet, is there a secret sauce that makes Balloon Tips silent?

Community
  • 1
  • 1
Gordon
  • 6,257
  • 6
  • 36
  • 89
  • 2
    *"I want to popup something which is important enough to grab the users' attention, but I want it to be silent so it doesn't grab their attention - overriding their computer volume control (which they set) and their system notification sound theme (which they set) because I know better than them"* - ... stop wanting to do this, it's user hostile and awful. If it is only for your computer, you can use [nircmd](http://www.nirsoft.net/utils/nircmd.html) to mute/unmute volume, which will be nicer than calling Windows APIs directly. – TessellatingHeckler Jun 14 '16 at 16:46
  • Or use a MsgBox that will pop up, they can click OK to make it go away, and there's no noise to it. – TheMadTechnician Jun 14 '16 at 16:59
  • So, to clarify, the use case is for a benchmark of Autodesk Revit. There's as many as 30 individual tests, so asking the user to click OK 30 times won't work. Indeed, 99% of use is the benchmark is running on a test machine while people do something else. The need for the info at all is that often you want to know what test segment is running while also looking at GPU-Z or Task Manager to see what resource use is like. Balloon Tips address the issue nicely, BUT I have complaints from users about the annoying sounds. So, looking for a solution to that user request. – Gordon Jun 14 '16 at 17:21
  • And FWIW, I plan to set it back to the user preference as soon as the benchmark is done, AND if the benchmark is prematurely terminated. But to do that I need to know WHAT the user chosen state is, so nircmd seems to not be a fit. I could force a mute, but if the user was also already muted I wouldn't know to not unmet when done. I suspect the easiest answer is a first balloon tip that says "You might want to mute now, as otherwise this is going to be annoying." – Gordon Jun 14 '16 at 17:26
  • And again, the best answer would be for me to choose to have my balloon tips be silent, but an alert from some other source still makes a sound. Unfortunately Balloon Tips didn't get implemented with that as an option. Alas. – Gordon Jun 14 '16 at 17:27
  • Have you looked into the `Write-Progress` cmdlet? This is a really nice non-invasive way to report progress on a PowerShell task. – Ryan Bemrose Jun 14 '16 at 17:33
  • Doing something else on another machine. You can't do a heavy CAD benchmark while using the machine, it's meaningless. But, I am all ears for an alternative, modal mechanism that demands zero user interaction. Something that allows me to launch the benchmark with a smart phone on a tripod recording the screen, and proceeds to provide pertinent information as needed for a few hours while multiple iterations of the test run. – Gordon Jun 14 '16 at 17:33
  • Ryan, the problem is the rather odd way Revit works. You launch it with a "journal" file, and it proceeds to repeat the commands recorded in the journal. Within any one journal there's lots of sections that need to be highlighted when they start, all while the management script is just waiting for the most recent Start-Process to return complete so Revit can be launched with the next journal. So, at least from what I understand Write-Progress could be used to show how much of the test is left, by updating as each Start-Process completes, but not to show the sections within. Edge case for sure! – Gordon Jun 14 '16 at 17:38
  • 1
    You can display all of the pertinent information into a Windows Forms dialog box. That way you have 100% control over its display and what it does or doesn't do. – Ryan Bemrose Jun 14 '16 at 17:44

0 Answers0