It is currently March 28th, 2024, 1:15 pm

Hiding music player when not in use.

Get help with creating, editing & fixing problems with skins
Post Reply
mohan
Posts: 1
Joined: December 3rd, 2020, 7:14 am

Hiding music player when not in use.

Post by mohan »

Hi, Im new to rainmeter I'm using a mond skin specifically player, I'm using it with windows media player. I wan't to hid the player when not in use i.e When ever the windows media player is not open the skin must stay hidden and as soon as i open the wmp, the skin to display. Is ther any way to acheive this?
Here is the link to skin https://visualskins.com/skin/mond'
I have attached the code.
Any help will be appericiated Thank you.
Attachments
Player.ini
This is the player code
(4.1 KiB) Downloaded 130 times
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding music player when not in use.

Post by balala »

mohan wrote: December 3rd, 2020, 7:22 am Is ther any way to acheive this?
Yep, there is. Just add the following measure to your code:

Code: Select all

[MeasureStatus]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=STATUS
IfCondition=(#CURRENTSECTION#>=1)
IfTrueAction=[!ShowFade]
IfFalseAction=[!HideFade]
The above measure, with the PlayerType=STATUS option returns 1 when the player is active (open) and 0 otherwise. So, while you have the player active the measure returns 1 and accordingly you get executed the IfTrueAction. Its [!ShowFade] bang shows the skin. When on the other hand you unload (close) the player, the measure turns 0, and you get executed the IfFalseAction and through its [!HideFade] bang, you get the skin hidden.
Note that this way, even if the skin is hidden, it still is loaded, just not visible, so it still consumes resources (obviously not too much, but not zero).
ashutosh.02
Posts: 3
Joined: November 14th, 2022, 6:07 pm

Re: Hiding music player when not in use.

Post by ashutosh.02 »

Thank you, it worked for me! :)
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding music player when not in use.

Post by balala »

ashutosh.02 wrote: November 14th, 2022, 6:09 pm it worked for me!
:thumbup:
Rythalion
Posts: 1
Joined: January 17th, 2023, 11:35 pm

Re: Hiding music player when not in use.

Post by Rythalion »

So i'm very new to this, where would I be putting this code into? I'd really like the media player gone entirely off of Rainmeter (Mond) as I won't use it. I am not even sure if that's what the other guy was asking for but idk.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding music player when not in use.

Post by balala »

Rythalion wrote: January 17th, 2023, 11:40 pm So i'm very new to this, where would I be putting this code into? I'd really like the media player gone entirely off of Rainmeter (Mond) as I won't use it. I am not even sure if that's what the other guy was asking for but idk.
If you have downloaded the Mond package, you have to add the above measure anywhere into the Mond\Player\Player.ini file. Don't forget to refresh the skin. By adding this, you get the skin hidden when there is nothing to play and shown when the player is playing. Not sure what you mean by "gone entirely off", but the measure hides the skin, doesn't deactivate (close) it. If you deactivate it, it won't be reactivated once the player starts playing.
Post Reply