Hi,
I've just added the Soita skin (current track playing in my media player) to my rainmeter setup. It's quite a large panel, and not useful when I don't have music playing. Is there any way to check if anything is playing and hide the panel if not? I've not really done much customising or development of skins, I've just used premade ones, so apologies if this is a daft question.
Thanks,
Paul
It is currently March 29th, 2024, 10:35 am
Soita skin - hide if no media playing
-
- Posts: 4
- Joined: May 21st, 2015, 1:32 pm
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Soita skin - hide if no media playing
Take a look at your code. It probably uses the NowPlaying plugin. There must be a parent measure (lets say it is called [MeasurePlayer]). This must have a PlayerName=YourPlayer option (eg PlayerName=WMP). Each child measure has a PlayerName=[MeasurePlayer] option. Find a child measure, which has PlayerType=STATE option. Probably you'll have this measure. Lets say its name is [MeasureState]. Add to it, these options:pf_moore wrote:Hi,
I've just added the Soita skin (current track playing in my media player) to my rainmeter setup. It's quite a large panel, and not useful when I don't have music playing. Is there any way to check if anything is playing and hide the panel if not? I've not really done much customising or development of skins, I've just used premade ones, so apologies if this is a daft question.
Thanks,
Paul
Code: Select all
IfCondition=(MeasureState=0)
IfTrueAction=[!HideFade "#CURRENTCONFIG#"]
IfFalseAction=[!ShowFade "#CURRENTCONFIG#"]
If you can't make it to work, post your code here please.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Soita skin - hide if no media playing
I'd be hesitant to hide the skin if the player "state" is "stopped", as then you really can't use the skin itself to stop and play music. I'd instead probably use "status", to determine if the player application is running or not.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Soita skin - hide if no media playing
Yes, you're right and when I read the post first time, that was what I thought to. But the original question was:jsmorley wrote:I'd be hesitant to hide the skin if the player "state" is "stopped", as then you really can't use the skin itself to stop and play music. I'd instead probably use "status", to determine if the player application is running or not.
and that's why I wrote my reply this way. Maybe indeed a status check would be better. Let's see what pf_moore would like to do.pf_moore wrote:Is there any way to check if anything is playing and hide the panel if not?
-
- Posts: 4
- Joined: May 21st, 2015, 1:32 pm
Re: Soita skin - hide if no media playing
First of all, thanks for the suggested code. I got it working exactly as you explained, and it is now working as I'd requested.balala wrote: Yes, you're right and when I read the post first time, that was what I thought to. But the original question was: and that's why I wrote my reply this way. Maybe indeed a status check would be better. Let's see what pf_moore would like to do.
To be honest, I hadn't thought about the issue of not being able to manage playback with the skin hidden, but now that it's been mentioned, yes it is a problem. So being able to detect when the player app is running is probably better.
I've therefore added a new measure that refers to STATUS, and hidden the skin when it's zero. Like this:
Code: Select all
[mStatus]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=STATUS
IfCondition=(mStatus=0)
IfTrueAction=[!HideFade "#CURRENTCONFIG#"]
IfFalseAction=[!ShowFade "#CURRENTCONFIG#"]
Once again, thanks for the help.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Soita skin - hide if no media playing
Yes, it is. Especially if it work!pf_moore wrote:Is that right? It seems to work, so I guess it is
-
- Posts: 1
- Joined: January 5th, 2017, 8:34 pm
Re: Soita skin - hide if no media playing
Just wanna say, I love you guys. This was exactly what I was looking for.