It is currently May 8th, 2024, 2:38 am
RAINMETER player (play) button
-
- Posts: 2
- Joined: September 15th, 2018, 10:03 am
RAINMETER player (play) button
Hello everyone. Is there any way that i can click on rainmeter player play button and it starts my AIMP and play the music? i tried alot of different commands and it wont work :/
-
- Posts: 860
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: RAINMETER player (play) button
Code: Select all
RightMouseUpAction=!CommandMeasure "MeasurePlayer" "OpenPlayer"
ToolTipText=Right Mouse Click to Open Player
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Rainmeter Sage
- Posts: 16202
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: RAINMETER player (play) button
I'm not sure this is enough. galaxyqt asked ifCyberTheWorm wrote:Use this for my play button, have to put the path the the player in the skinCode: Select all
RightMouseUpAction=!CommandMeasure "MeasurePlayer" "OpenPlayer" ToolTipText=Right Mouse Click to Open Player
Opening the app probably doesn't starts it playing.galaxyqt wrote:Is there any way that i can click on rainmeter player play button and it starts my AIMP and play the music?
I'm not using AIMP, so I'm not sure this will entirely work, but maybe it worth a try.
You need to check two things: if the player is open and if it is, if it's playing, is paused or stopped. For this you need two NowPlaying measures:
Code: Select all
[MeasurePlayer]
Measure=NowPlaying
PlayerName=AIMP
PlayerType=STATUS
[MeasureState]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=STATE
Code: Select all
[MeasurePlay]
Measure=Calc
Formula=(( MeasurePlayer = 0 ) ? -1 : MeasureState )
IfCondition=(#CURRENTSECTION#<0)
IfTrueAction=[!SetOption MeterPlay LeftMouseUpAction """[!CommandMeasure "MeasurePlayer" "OpenPlayer"][!Delay "2000"][!CommandMeasure "MeasurePlayer" "Play"]"""][!UpdateMeter "MeterPlay"]
IfFalseAction=[!SetOption MeterPlay LeftMouseUpAction """[!CommandMeasure "MeasurePlayer" "PlayPause"]"""][!UpdateMeter "MeterPlay"]
Otherwise the Play button will be set to start playing if the player is stopped or paused and pause it if it's playing.
Obviously you also need the Play button. I created an extremely simply such button, which is in fact a String meter:
Code: Select all
[MeterPlay]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Play
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
[MeasurePlayer]
Measure=NowPlaying
PlayerName=AIMP
PlayerType=STATUS
[MeasureState]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=STATE
[MeasurePlay]
Measure=Calc
Formula=(( MeasurePlayer = 0 ) ? -1 : MeasureState )
IfCondition=(#CURRENTSECTION#<0)
IfTrueAction=[!SetOption MeterPlay LeftMouseUpAction """[!CommandMeasure "MeasurePlayer" "OpenPlayer"][!Delay "2000"][!CommandMeasure "MeasurePlayer" "Play"]"""][!UpdateMeter "MeterPlay"]
IfFalseAction=[!SetOption MeterPlay LeftMouseUpAction """[!CommandMeasure "MeasurePlayer" "PlayPause"]"""][!UpdateMeter "MeterPlay"]
[MeterPlay]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Play
Please galaxyqt, let me know if this is closer to your needs.
-
- Posts: 2
- Joined: September 15th, 2018, 10:03 am
Re: RAINMETER player (play) button
i should paste it no matter where in text folder?
-
- Rainmeter Sage
- Posts: 16202
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: RAINMETER player (play) button
The last code I posted is a complete code of an extremely simple Rainmeter skin. Probably you already have a skin. If you do, make a backup of it (just in case) then paste the above code in the .ini file of your skin (replacing the existing code), save it and refresh the appropriate skin. Give it a try, to see if it matches your needs.galaxyqt wrote:i should paste it no matter where in text folder?
Does it?