Audio Mute and Unmute

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
shamigc
Junior Coder
Posts: 37
Joined: Wed Oct 22, 2003 11:38 am
Location: Monterrey, Mexico

Audio Mute and Unmute

Post by shamigc » Fri Jun 17, 2005 3:21 pm

Hi,

Does anybody can help me to find the best way to mute and unmute my notebook speakers?

Thanks,
Salvador Hernandez
Thanks,
Salvador Hernandez

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Mon Jun 20, 2005 1:08 am

You Could Try http://www.grc.com/wizmo/wizmo.htm

Then Use A Macro To Call The Mute/UnMute Command.

Eg.
RunProgram>Wizmo mute=1 Wizmo mute=0 <-- Will Unmute The Sound.

You Can Then Write This Into Your Script Anywhere You Want.
FIREFIGHTER

shamigc
Junior Coder
Posts: 37
Joined: Wed Oct 22, 2003 11:38 am
Location: Monterrey, Mexico

Parameters problem

Post by shamigc » Mon Jun 20, 2005 5:02 am

CyberCitizen wrote:You Could Try http://www.grc.com/wizmo/wizmo.htm

Then Use A Macro To Call The Mute/UnMute Command.

Eg.
RunProgram>Wizmo mute=1 Wizmo mute=0 Wizmo mute=1

I also tried using "mute=1" and /mute=1, but neither one worked, Does anybody can help me?

Thanks,
shamigc
Thanks,
Salvador Hernandez

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Mon Jun 20, 2005 6:00 am

Sorry Wrote The Post Pretty Quickly, Give This A Try.
Run Program>c:\wizmo.exe mute=1
Run Program>c:\wizmo.exe mute=0

Run Program>c:\wizmo.exe mute=1 c:\wizmo.exe mute=0 c:\wizmo.exe volume=50 <-- This Will Set The Volume To 50%

Just Make Sure That You Remove All The Trailing Spaces.
FIREFIGHTER

shamigc
Junior Coder
Posts: 37
Joined: Wed Oct 22, 2003 11:38 am
Location: Monterrey, Mexico

Post by shamigc » Mon Jun 20, 2005 12:06 pm

CyberCitizen wrote:Sorry Wrote The Post Pretty Quickly, Give This A Try.
Run Program>c:\wizmo.exe mute=1
Run Program>c:\wizmo.exe mute=0

Run Program>c:\wizmo.exe mute=1 c:\wizmo.exe mute=0 c:\wizmo.exe volume=50 <-- This Will Set The Volume To 50%

Just Make Sure That You Remove All The Trailing Spaces.
Hi,
I already tried as you just told me, without success, I only hear a sound like a "ghost", that I think is generated by wizmo, but the state mute/unmuted is not changed. Have you tried by yourself?

Thanks,
Salvador Hernandez
Thanks,
Salvador Hernandez

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Tue Jun 21, 2005 1:03 am

Here Is The Script I Use. Has Been Tested & Does Work. I Have Attached A Link To The EXE Below The Script.

Dialog>Wizmo_Control
Caption=Windows Wizmo Control
Top=120
Width=355
Left=16
Height=198
Label=Windows Wizmo Control,8,8
Button=Mute,8,32,105,57,1
Button=UnMute,8,96,105,57,2
Button=Volume 50%CRLF%Percent,120,32,105,57,5
Button=Volume 100%CRLF%Percent,120,96,105,57,6
Button=Open CD Tray,232,32,105,57,3
Button=Close CD Tray,232,96,105,57,4
EndDialog>Wizmo_Control

Show>Wizmo_Control,r
if>r=,Exit
if>r=1,Mute
if>r=2,UnMute
if>r=3,CDRomOpen
if>r=4,CDRomClose
if>r=5,Volume_50
if>r=6,Volume_100
Goto>Exit

Label>Mute
Let>result=mute=1
Goto>Run

Label>UnMute
Let>result=mute=0
Goto>Run

Label>CDRomOpen
Let>result=open
Goto>Run

Label>CDRomClose
Let>result=close
Goto>Run

Label>Volume_50
Let>result=volume=50
Goto>Run

Label>Volume_100
Let>result=volume=100
Goto>Run

Label>Run
Run Program>"C:\Mike's Stuff\www.grc.com\wizmo.exe" %result%
Goto>Exit

Label>Exit
FIREFIGHTER

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Tue Jun 15, 2010 9:09 pm

I just came across this as another way to mute/unmute using only Macro Scheduler code. Each time you call ToggleMute, it toggles the state.

Code: Select all

VBStart
Sub ToggleMute()
  Dim WshShell
  Set WshShell = CreateObject("WScript.Shell")
  WshShell.SendKeys(chr(&hAD))
End Sub
VBEnd

VBRun>ToggleMute

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Wed Jun 16, 2010 5:16 am

Hi adroege,

I just wanted to say thanks for that bit of MS code to mute/unmute... very handy.

Thanks also for all your contributions on the forums recently - its great to have you around.

Take care
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts