Page 1 of 2

Rainmeter skin opens after music player?

Posted: March 24th, 2017, 10:57 pm
by GioRgSaVv
Does anyone know if it is possible for a skin to open when music player opens, and closes when music player closes?

I just made an awesome music player skin and the only thing it lacks is this.. This skin is going to be always on top, so if I don't listen to music it will be useless to be on top, just showing ''N/A - N/A 00:00:''

When I completely finish it I will upload it on deviantart :D

Re: Rainmeter skin opens after music player?

Posted: March 24th, 2017, 11:05 pm
by jsmorley
GioRgSaVv wrote:Does anyone know if it is possible for a skin to open when music player opens, and closes when music player closes?

I just made an awesome music player skin and the only thing it lacks is this.. This skin is going to be always on top, so if I don't listen to music it will be useless to be on top, just showing ''N/A - N/A 00:00:''

When I completely finish it I will upload it on deviantart :D
You would have to have some other skin, that is always running and is watching for the process of the media player. That skin can then load the other skin, and if the process for the media player goes away, it can close it.

Of course you can't have the media player skin itself do this, how does that even make sense? ;-)

What you might want to do instead is have the media player skin disable its own measures and hide its own meters when it detects that the media player isn't running. So when that process isn't found, the media player skin collapses down to a bare minimum, but stays running, only watching, watching for the media player process to come back.

Re: Rainmeter skin opens after music player?

Posted: March 24th, 2017, 11:09 pm
by eclectic-tech
This will deactivate/activate a skin in the root folder of your config when there is audio.
Create a skin in a sub folder like this:
#RootConfig#\Monitor\AudioMonitor.ini
and have it run in the background; it will monitor the audio...

Code: Select all

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output

[MeasureSound]
Measure=Calc
Formula=MeasureAudio
IfCondition=([MeasureAudio:]<0.0001)
IfTrueAction=[!DeactivateConfig "#RootConfig#" "{NameOfYourConfig.ini}"]
IfFalseAction=[!ActivateConfig "#RootConfig#"]
DynamicVariables=1

; ========= Meter Styles ==========



; ========= Meters ==========
[Dummy]
Meter=String

Re: Rainmeter skin opens after music player?

Posted: March 24th, 2017, 11:11 pm
by jsmorley
eclectic-tech wrote:This will deactivate/activate a skin in the root folder of your config when there is audio.
Create a skin in a sub folder like this:
#RootConfig#\Monitor\AudioMonitor.ini
and have it run in the background; it will monitor the audio...

Code: Select all

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output

[MeasureSound]
Measure=Calc
Formula=MeasureAudio
IfCondition=([MeasureAudio:]<0.0001)
IfTrueAction=[!DeactivateConfig "#RootConfig#" "{NameOfYourConfig.ini}"]
IfFalseAction=[!ActivateConfig "#RootConfig#"]
DynamicVariables=1

; ========= Meter Styles ==========



; ========= Meters ==========
[Dummy]
Meter=String
Uhm, so every time Windows makes a beep or boop your media player skin pops up? :-) And every time the song you are playing is silent for a second for artistic effect your skin closes? :-)

I think AutdioLevel would be an ... interesting choice for detecting this. It might be preferable to use the Process plugin to watch for Winamp.exe or whatever your media player is...

Re: Rainmeter skin opens after music player?

Posted: March 24th, 2017, 11:18 pm
by jsmorley
Something like:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureProcess]
Measure=Plugin
Plugin=Process
ProcessName=Winamp.exe
IfCondition=MeasureProcess = 1
IfTrueAction=[!EnableMeasureGroup "AllTheMediaMeasures"][!ShowMeterGroup "AllTheMediaMeters"][!UpdateMeter *][!Redraw]
IfFalseAction=[!DisableMeasureGroup "AllTheMediaMeasures"][!HideMeterGroup "AllTheMediaMeters"][!UpdateMeter *][!Redraw]

[MeterSongTitle]
Meter=String
Group=AllTheMediaMeters
InlineSetting=Size | 30
InlineSetting2=Weight | 400
InlineSetting3=Color | 255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=We All Live in a Yellow Submarine
This can be right in the media player skin. Having a second skin that is the "monitor" is ok, but prone to problems. If that skin isn't running for some reason, it all falls apart.

Re: Rainmeter skin opens after music player?

Posted: March 24th, 2017, 11:29 pm
by GioRgSaVv
in ''AllTheMediaMeasures/Meters" I will have to write my skin name? I don't quite get it.. I don't know much about rainmeter :P
How can I make this work?

Re: Rainmeter skin opens after music player?

Posted: March 24th, 2017, 11:30 pm
by jsmorley
GioRgSaVv wrote:in ''AllTheMediaMeasures/Meters" I will have to write my skin name? I don't quite get it.. I don't know much about rainmeter :P
How can I make this work?
Just add that Process measure near the top of your skin, and in each and every other measure and meter in your skin add either:

Group=AllTheMediaMeasures
Group=AllTheMediaMeters

Respectively...

That's it.

Re: Rainmeter skin opens after music player?

Posted: March 24th, 2017, 11:51 pm
by GioRgSaVv
I still can't get it :confused:

In Music Player Skin I will have to write

[Rainmeter]
Update=1
Group=AllTheMediaMeasures
Group=AllTheMediaMeters

And in the other skin I will have to write

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureProcess]
Measure=Plugin
Plugin=Process
ProcessName=Winamp.exe
IfCondition=MeasureProcess = 1
IfTrueAction=[!EnableMeasureGroup "AllTheMediaMeasures"][!ShowMeterGroup "AllTheMediaMeters"][!UpdateMeter *][!Redraw]
IfFalseAction=[!DisableMeasureGroup "AllTheMediaMeasures"][!HideMeterGroup "AllTheMediaMeters"][!UpdateMeter *][!Redraw]

right?

Re: Rainmeter skin opens after music player?

Posted: March 24th, 2017, 11:59 pm
by eclectic-tech
jsmorley wrote:Uhm, so every time Windows makes a beep or boop your media player skin pops up? :-) And every time the song you are playing is silent for a second for artistic effect your skin closes? :-)

I think AutdioLevel would be an ... interesting choice for detecting this. It might be preferable to use the Process plugin to watch for Winamp.exe or whatever your media player is...
I use this to disable resource hungry visualizers... it works fine for that, but your process monitor is better for this request... carry on! :thumbup:

Re: Rainmeter skin opens after music player?

Posted: March 25th, 2017, 12:05 am
by jsmorley
GioRgSaVv wrote:I still can't get it :confused:

In Music Player Skin I will have to write

[Rainmeter]
Update=1
Group=AllTheMediaMeasures
Group=AllTheMediaMeters

And in the other skin I will have to write

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureProcess]
Measure=Plugin
Plugin=Process
ProcessName=Winamp.exe
IfCondition=MeasureProcess = 1
IfTrueAction=[!EnableMeasureGroup "AllTheMediaMeasures"][!ShowMeterGroup "AllTheMediaMeters"][!UpdateMeter *][!Redraw]
IfFalseAction=[!DisableMeasureGroup "AllTheMediaMeasures"][!HideMeterGroup "AllTheMediaMeters"][!UpdateMeter *][!Redraw]

right?
No, forget any "other" skin. In your media player skin add:

[MeasureProcess]
Measure=Plugin
Plugin=Process
ProcessName=Winamp.exe
IfCondition=MeasureProcess = 1
IfTrueAction=[!EnableMeasureGroup "AllTheMediaStuff"][!ShowMeterGroup "AllTheMediaStuff"][!UpdateMeter *][!Redraw]
IfFalseAction=[!DisableMeasureGroup "AllTheMediaStuff"][!HideMeterGroup "AllTheMediaStuff"][!UpdateMeter *][!Redraw]

Doesn't matter much where you put it, but I would recommend fairly close to the top after the [Rainmeter] and [Variables] sections.

Then in each and every OTHER measure and meter [SectionName] in that same skin, add a line that is:

Group=AllTheMediaStuff

That's it.

So what will happen is that that [MeasureProcess] measure will be constantly watching to see if Winamp.exe (Please replace Winamp.exe with the executable for YOUR media player) is running. If it isn't, it will disable all measures and hide all meters in the skin. So it will just become "invisible" and won't be doing anything but continuing to watch for Winamp.exe. If Winamp.exe is running, it will enable all the measures and show all the meters and your media player skin is off and running.