Is it possible to Mute/Unmute via the NowPlaying plugin? If so, how?
I've searched the forum, and can only locate instructions to mute/unmute via Win7AudioPlugin. But that mutes system wide volume, and not just the media player.
And the NowPlaying document page, does not mention Mute ability
Trying to mute volume on "LeftMouseUpAction" then on second click, resume volume at prior state before mute.
Right now, I only have a work around, of Mute = SetVolume -100 / Unmute = SetVolume +100
Thank you for any help given..
It is currently April 28th, 2024, 3:03 am
NowPlaying + Mute
-
- Posts: 34
- Joined: January 21st, 2012, 12:32 am
NowPlaying + Mute
Last edited by UberSlackr on August 7th, 2012, 6:01 am, edited 1 time in total.
-
- Posts: 1173
- Joined: January 22nd, 2011, 4:23 pm
- Location: GMT +8
Re: NowPlaying + Mute
You could use the WindowMessagePlugin to toggle the mute of the Windows Media Player on and off. I'm not sure what other media players it works with.
Code: Select all
[MeasureWindowsMedia]
Measure=Plugin
Plugin=WindowMessagePlugin.dll
WindowClass=WMPlayerApp
[MeterToggleMute]
Meter=IMAGE
ImageName=sound.png
LeftMouseUpAction=[!CommandMeasure "MeasureWindowsMedia SendMessage 273 18817 0"]
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: NowPlaying + Mute
You could also use a variable to swap with the current volume:
(Given mPlayer and mVolume as your measure names.)
Code: Select all
[Variables]
LastVolume=0
[MeterToggleMute]
LeftMouseUpAction=[!SetVariable LastVolume "[mVolume]"][!CommandMeasure mPlayer "SetVolume #LastVolume#"][!Update]
DynamicVariables=1
-
- Posts: 34
- Joined: January 21st, 2012, 12:32 am
Re: NowPlaying + Mute
Kaelri wrote:You could also use a variable to swap with the current volume:
(Given mPlayer and mVolume as your measure names.)Code: Select all
[Variables] LastVolume=0 [MeterToggleMute] LeftMouseUpAction=[!SetVariable LastVolume "[mVolume]"][!CommandMeasure mPlayer "SetVolume #LastVolume#"][!Update] DynamicVariables=1
Many Many Thanks Kaelri.. That worked out perfectly.
-
- Rainmeter Sage
- Posts: 889
- Joined: September 6th, 2011, 6:34 am
Re: NowPlaying + Mute
You only get problems when you change the volume to a positive value by hand after muting, then click the mute button again.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: NowPlaying + Mute
That's true. This would be a more resilient approach:MerlinTheRed wrote:You only get problems when you change the volume to a positive value by hand after muting, then click the mute button again.
Code: Select all
[mLastPositiveVolume]
Measure=Calc
Formula=(mVolume > 0) ? mVolume : mLastPositiveVolume
[mNewVolume]
Measure=Calc
Formula=(mVolume > 0) ? 0 : mLastPositiveVolume
[MeterToggleMute]
LeftMouseUpAction=[!CommandMeasure mPlayer "SetVolume [mNewVolume]"][!Update]