It is currently December 13th, 2018, 2:36 pm

AppVolume Plugin: Get apps volume and peak level, control apps volume and mute.

Share your custom plugins and applications to enhance Rainmeter.
User avatar
khanhas
Posts: 32
Joined: October 26th, 2016, 5:00 pm

AppVolume Plugin: Get apps volume and peak level, control apps volume and mute.

khanhas » October 25th, 2017, 5:28 pm

A plugin that extend Rainmeter functionality: Get apps volume and peak level, control apps volume and mute.
Download: https://github.com/khanhas/AppVolumePlugin/releases

PARENT MEASURE
Option:
IgnoreSystemSound (default = 1)
System sound is Windows notification sound.
Set to 0 to include System Sound. Set to 1 to skip System Sound.

Number value: Total number of apps. You can use this value to generate enough child measures and prevent out of range error.
String value: Current device name.

Example:

Code: Select all

[AppVolumeParent]
Measure = Plugin
Plugin = AppVolume
IgnoreSystemSound = 1

CHILD MEASURE
Options:

Parent
You have to set this to Parent measure name.

Index (default = 0)
Index of app you want to get information and control. It has to be in range from 1 to number value of Parent measure.

AppName
Specific name of app you want to get information and control. You need to include app name and its extension. Eg: Spotify.exe, AIMP.exe
If this option is not empty and Index is also set, it overrides Index option.

NumberType (default = volume)
Value you want to return in number value of measure. Valid options are volume or peak.

StringType (default = filename)
Value you want to return in string value of measure. Valid options are filename or filepath.

Example:

Code: Select all

[AppIndex2]
Measure = Plugin
Plugin = AppVolume
Parent = AppVolumeParent
Index = 2
NumType = Peak

Code: Select all

[FoobarVolume]
Measure = Plugin
Plugin = AppVolume
Parent = AppVolumeParent
AppName = Foobar.exe
NumType = Volume
StringType = Filepath

BANGS
Both parent and child:
!CommandMeasure MeasureName "Update"
You can use this bang after changing measure option so you do not have to set DynamicVariables = 1
Eg:

Code: Select all

LeftMouseUpAction = [!SetOption AppIndex2 NumType Volume][!CommandMeasure AppIndex2 "Update"]

Only child:
!CommandMeasure MeasureName "SetVolume x"
Set app volume to *x* (from 0 to 100).

!CommandMeasure MeasureName "ChangeVolume x"
Change the volume by *x*. You can use negative numbers to decrease volume.

!CommandMeasure MeasureName "Mute"
Mute app.

!CommandMeasure MeasureName "UnMute"
Unmute app.

!CommandMeasure MeasureName "ToggleMute"
Toggle mute app.

SECTION VARIABLES
Only available in Rainmeter version >= 4.1
An additional way to get app volume and peak by index or app name. DynamicVariables = 1 is required in where you use these variables.
[ParentMeasureName:GetVolumeFromIndex(x)]
[ParentMeasureName:GetPeakFromIndex(x)]
[ParentMeasureName:GetFileNameFromIndex(x)]
[ParentMeasureName:GetFilePathFromIndex(x)]

x is from 1 to number value of Parent measure.

[ParentMeasureName:GetVolumeFromAppName(name)]
[ParentMeasureName:GetPeakFromAppName(name)]

name is name of app you want to get. You need to include app name and its extension.

Example:

Code: Select all

[AppVolumeParent]
Measure = Plugin
Plugin = AppVolume
IgnoreSoundSystem = 0

[Calc_SpotifyVolume]
Measure = Calc
Formula = [AppVolumeParent:GetVolumeFromAppName(spotify.exe)] * 100
DynamicVariables = 1

[Meter_SpotifyVolume]
Meter = String
MeasureName = Calc_SpotifyVolume
Text = Spotify: %1%
FontSize = 40
FontColor = 1FD662
AntiAlias = 1
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3051
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: AppVolume Plugin: Get apps volume and peak level, control apps volume and mute.

eclectic-tech » October 25th, 2017, 9:16 pm

8-) :thumbup:
User avatar
Mor3bane
Posts: 558
Joined: May 7th, 2016, 7:32 am

Re: AppVolume Plugin: Get apps volume and peak level, control apps volume and mute.

Mor3bane » October 11th, 2018, 3:45 am

Is there a way to get the volume/peak from an app that requires administrator permission to run?

I am getting a response from all apps that do not require administrator, but not the ones that do.

Thanks for any advice.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself
User avatar
Brian
Developer
Posts: 1793
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: AppVolume Plugin: Get apps volume and peak level, control apps volume and mute.

Brian » October 11th, 2018, 5:29 am

Mor3bane wrote:Is there a way to get the volume/peak from an app that requires administrator permission to run?
Did you try running Rainmeter as a administrator?

-Brian
User avatar
Mor3bane
Posts: 558
Joined: May 7th, 2016, 7:32 am

Re: AppVolume Plugin: Get apps volume and peak level, control apps volume and mute.

Mor3bane » October 11th, 2018, 6:56 am

Brian wrote:Did you try running Rainmeter as a administrator?

-Brian
Well HOT DOG! that was all it needed! :17good
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself
User avatar
khanhas
Posts: 32
Joined: October 26th, 2016, 5:00 pm

Re: AppVolume Plugin: Get apps volume and peak level, control apps volume and mute.

khanhas » October 12th, 2018, 10:59 am

AppVolume 1.2.3 is no longer needed adminstrator permission to catch admin privileged apps.
Download new one here: https://github.com/khanhas/AppVolumePlugin/releases