Unmute Windows sound using WScript.Shell

How can I unmute the sound in Windows using Matlab?
In VBA this can be done using elegantly:
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys (Chr(&HAD))
But in Matlab I faild to use the method SendKeys to the method:
f=actxserver('WScript.Shell')
The post of Yair Altman: http://www.mathworks.com/matlabcentral/fileexchange/25584-soundvolume-set-or-get-the-system-speaker-sound-volume does unfortunately not work either. Any help on this?
Patrice

댓글 수: 4

Daniel Shub
Daniel Shub 2012년 8월 8일
What version of Windows are you using? How many and what types (i.e., internal, USB, firewire) of soundcards are you using?
Patrice Tscherrig
Patrice Tscherrig 2012년 8월 10일
Win XP and Win7. I'm interested in the solution for both environments. It's just an internal soundcard. Again - in VBA the SendKeys method works well - but I fail to correctly call it in Matlab.
Friedrich
Friedrich 2012년 8월 10일
Youe posted code doesn't work for me in VBA (Excel 2010, Win 7). And it also doesnt work in VBS. Are you sure that this code works on Win 7 and XP the same way?
Jan
Jan 2012년 8월 19일
"Does not work" is not sufficient description of the problem with Yair's Java tool.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

태그

질문:

2012년 8월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by