It is currently June 22nd, 2024, 3:03 pm

Music player infinite text flow

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16322
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Music player infinite text flow

Post by balala »

Kaizenitsune wrote: December 15th, 2022, 10:17 am I had understood that I should not delete the IfCondition / IfTrueAction and IfCondition2 / IfTrueAction2, sorry I had then misunderstood.
No problem from my part, just keep in mind that you can't duplicate anything in Rainmeter codes. Can't use twice the same variable, section name or option on any section. This is a general rule for any .ini formatted file.
Kaizenitsune wrote: December 15th, 2022, 10:17 am I have colored the images back to white and now they have the desired color.
Post them, please.
Kaizenitsune wrote: December 15th, 2022, 10:17 am Now I just need to change the base color so it doesn't look so bluish anymore. I would like this bluish color to become the BRED from the code.

Image 1 is the normal color
1.PNG
Image 2 is the color as soon as I click on it
2.PNG

I have already tried to change the color in the IfCondition/IfTrueAction but without success.

I have also given the variables now the desired color code and have given clearer designations to the COLOR. I just have to figure out what to make out of DarkBlue, MediumBlue, AlmostBlack, AlmostWhite.
Not sure I follow. Please give a detailed list of what would you like the buttons to look like. I'd like something like this:
  • When the mouse is not over them, they should have Color1.
  • When hovering the mouse over them they should get Color2.
  • When clicking they should get Color3.
What Color1, Color2 and Color3 are? If there are further, above not-listed cases, please list them all.
Kaizenitsune
Posts: 33
Joined: December 9th, 2022, 3:25 am

Re: Music player infinite text flow

Post by Kaizenitsune »

balala wrote: December 15th, 2022, 6:30 pm No problem from my part, just keep in mind that you can't duplicate anything in Rainmeter codes. Can't use twice the same variable, section name or option on any section. This is a general rule for any .ini formatted file.

Post them, please.

Not sure I follow. Please give a detailed list of what would you like the buttons to look like. I'd like something like this:
  • When the mouse is not over them, they should have Color1.
  • When hovering the mouse over them they should get Color2.
  • When clicking they should get Color3.
What Color1, Color2 and Color3 are? If there are further, above not-listed cases, please list them all.
So my plan is that the normal color is Grey, when I hover over it with the mouse it is BRED and when I click on it it is RED, I have already named the colors under Variables and given them the correct color as assignment. Therefore it would also be desirable if I sometime the colors DarkBlue, AlmostBlack and AlmostWhite disappear completely from the code. So that it is uniform I colored all used Icons white, these I will add also again as appendix.

For the time being, I have deliberately used Play, Pause etc.. NOT colored, because they work through ImageTint.

Here the complete code

Code: Select all

[Rainmeter]
Update=200
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]
MouseActionCursorName=Hand
MouseOverAction=!CommandMeasure Lua Pause=0
MouseLeaveAction=!CommandMeasure Lua Pause=1
 
[Variables]
ScrollMouseIncrement=0.1
Player=Spotify
Scale=3.1
DarkBlue=27,63,107,255
MediumBlue=92,135,209,255
AlmostBlack=40,40,40,255
AlmostWhite=255,255,255
RED=211,40,56
GREY=117,140,148
BRED=123,0,44
Heart=0
Shuffle=0
Repeat=0

;-------------------------------------------------------------

[MeasureStatus]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=STATUS
IfCondition=(#CURRENTSECTION#>=1)
IfTrueAction=[!ShowFade]
IfFalseAction=[!HideFade]

;-----[Album Art]-----

[MeasureAlbumArt] 
Measure=Plugin 
Plugin=WebNowPlaying 
PlayerName=#Player# 
PlayerType=COVER 

[MeterAlbumArt] 
Meter=Image 
MeasureName=MeasureAlbumArt 
Meter=String 
MeasureName=MeasureTitle 
StringAlign=Left 
X=(0*#Scale#) 
Y=(0*#Scale#) 
W=(100*#Scale#) 
Text="%1" 
ClipString=1 
AntiAlias=1 
 
;-----[Title]----- 

[MeasureTitle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=TITLE
Substitue="":""

[LuaTitle]
Measure=Script
ScriptFile=#@#Marquee.lua
MeasureName=MeasureTitle

[MeterTitle]
Meter=String
MeasureName=LuaTitle
StringAlign=Left
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(8*#Scale#)
X=(105*#Scale#)
Y=(5*#Scale#)
W=(130*#Scale#)
Text="%1"
ClipString=1
AntiAlias=1

;-----[Artist]----- 

[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ARTIST
Substitue="":""

[LuaArtist]
Measure=Script
ScriptFile=#@#Marquee.lua
MeasureName=MeasureArtist

[MeterArtist]
Meter=String
MeasureName=LuaArtist
StringAlign=Left
StringCase=Upper
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(7*#Scale#)
X=(105*#Scale#)
Y=(18*#Scale#)
W=(130*#Scale#)
Text="%1"
ClipString=1
AntiAlias=1

;-----[Album Title]-----

[MeasureAlbum]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ALBUM
Substitue="":""

[LuaAlbum]
Measure=Script
ScriptFile=#@#Marquee.lua
MeasureName=MeasureAlbum

[MeterAlbum]
Meter=String
MeterStyle=SpotifyStyleAlbum
MeasureName=LuaAlbum
StringAlign=Left
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(6*#Scale#)
X=(105*#Scale#)
Y=(30*#Scale#)
W=(130*#Scale#)
Text="%1"
ClipString=1
AntiAlias=1

;-----[Song Progress]-----

[MeasureProgress]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=PROGRESS

[MeterBar]
Meter=Shape
X=(105*#Scale#)
Y=(70*#Scale#)
Shape=Rectangle 0,0,(130*#Scale#),(1.5*#Scale#),0 | Fill Color 255,255,255,30 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*1.2*#Scale#),(1.5*#Scale#),0 | Fill Color 211,40,56 | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*1.2*#Scale#),(0.8*#Scale#),(1.5*#Scale#) |Fill Color 255,255,255 | StrokeWidth 0
Shape4=Rectangle 0,(-1*#Scale#),(120*#Scale#),(3*#Scale#),0 | Fill Color 255,255,255,1 | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]

;-----[Song Duration]-----

[MeasureDuration]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=DURATION

[MeasurePosition]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Position
UpdateDivider = 5
Substitute="":"N/A"

[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasureDuration - MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasureDuration - MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

[MeterDuration]
Meter=String
MeasureName=MeasureDuration
StringAlign=Center
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(5*#Scale#)
X=(112*#Scale#)
Y=(75*#Scale#)
Text="%1"
AntiAlias=1

[MeterDuration2]
Meter=String
MeasureName=MeasureMinutesRemaining
MeasureName2=MeasureSecondsRemaining
StringAlign=Center
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(5*#Scale#)
X=(226*#Scale#)
Y=(75*#Scale#)
Text="%1:%2"
AntiAlias=1

;-----[Song Play & Pause]-----

[MeasureStateButton]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"#@#Images\Play.png","1":"#@#Images\Pause.png","2":"#@#Images\Play.png"

[MeterPlayPause]
Meter=Image
ImageName=[MeasureStateButton]
X=(160*#Scale#)
Y=(50*#Scale#)
W=(15*#Scale#)
AntiAlias=1
SolidColor=255,255,255,1
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureStateButton" "PlayPause"]

;-----[Song Previous]-----

[MeterPrevious]
Meter=Image
ImageName=#@#Images\Previous.png
X=(145*#Scale#)
Y=(52*#Scale#)
W=(10*#Scale#)
AntiAlias=1
SolidColor=255,255,255,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Previous"]

;-----[Song Next]-----

[MeterNext]
Meter=Image
ImageName=#@#Images\Next.png
X=(180*#Scale#)
Y=(52*#Scale#)
W=(10*#Scale#)
AntiAlias=1
SolidColor=255,255,255,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Next"]

;-----[Song Heart]-----

[MeasureHeartRaw]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Rating
IfCondition=((MeasureHeartRaw=0)&&(#Heart#=0))
IfTrueAction=[!SetOption MeterHeart ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition2=((MeasureHeartRaw=5)&&(#Heart#=0))
IfTrueAction2=[!SetOption MeterHeart ImageTint "#RED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition3=((MeasureHeartRaw=0)&&(#Heart#=1))
IfTrueAction3=[!SetOption MeterHeart ImageTint "#BRED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition4=((MeasureHeartRaw=5)&&(#Heart#=1))
IfTrueAction4=[!SetOption MeterHeart ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
DynamicVariables=1

[MeasureHeart]
Measure=Calc
Formula=(MeasureHeartRaw=5 ? 0 : 5)

[MeterHeart]
Meter=Image
ImageName=#@#images\heart.png
ImageTint=#AlmostWhite#
X=(145*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
LeftMouseUpAction=[!CommandMeasure MeasureHeartRaw "SetRating [&MeasureHeart]"]
AntiAlias=1
MouseOverAction=[!SetVariable Heart "1"][!UpdateMeasure "MeasureHeartRaw"]
MouseLeaveAction=[!SetVariable Heart "0"][!UpdateMeasure "MeasureHeartRaw"]
SolidColor=0,0,0,1

;-----[Song Shuffle]-----

[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Shuffle
IfCondition=MeasureShuffle = 0
IfCondition=((MeasureShuffle=0)&&(#Shuffle#=0))
IfTrueAction=[!SetOption MeterShuffle ImageTint "#MediumBlue#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition2=((MeasureShuffle=5)&&(#Shuffle#=0))
IfTrueAction2=[!SetOption MeterShuffle ImageTint "#AlmostWhite#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition3=((MeasureShuffle=0)&&(#Shuffle#=1))
IfTrueAction3=[!SetOption MeterShuffle ImageTint "#RED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition4=((MeasureShuffle=5)&&(#Shuffle#=1))
IfTrueAction4=[!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
DynamicVariables=1

[MeterShuffle]
Meter=Image
ImageName=#@#Images\shuffle.png

X=(160*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
Group=DynamicColors
LeftMouseUpAction=[!CommandMeasure MeasureShuffle "Shuffle"]
AntiAlias=1
MouseOverAction=[!SetVariable Shuffle "1"][!UpdateMeasure "MeasureShuffle"]
MouseLeaveAction=[!SetVariable Shuffle "0"][!UpdateMeasure "MeasureShuffle"]
SolidColor=0,0,0,1

;-----[Song Repeat]-----

[MeasureRepeat]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Repeat
IfCondition=MeasureRepeat = 0
IfTrueAction=[!SetOption MeterRepeat ImageTint "#MediumBlue#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition2=MeasureRepeat = 1
IfTrueAction2=[!SetOption MeterRepeat ImageTint "#AlmostWhite#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition3=MeasureRepeat = 2
IfTrueAction3=[!SetOption MeterRepeat ImageTint "#AlmostWhite#"][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]

[MeterRepeat]
Meter=Image
ImageName=#@#Images\shuffle.png
X=(175*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
Group=DynamicColors
LeftMouseUpAction=[!CommandMeasure MeasureRepeat "Repeat"]
AntiAlias=1
MouseOverAction=[!SetVariable Repeat "1"][!UpdateMeasure "Measurerepeat"]
MouseLeaveAction=[!SetVariable  Repeat "0"][!UpdateMeasure "MeasureRepeat"]
SolidColor=0,0,0,1
IfCondition=((MeasureRepeat=0)&&(#Repeat#=0))
IfTrueAction=[!SetOption MeterRepeat ImageTint "#GREY#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition2=((MeasureRepeat=1)&&(#Repeat#=0))
IfTrueAction2=[!SetOption MeterRepeat ImageTint "#RED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition3=((MeasureRepeat=2)&&(#Repeat#=0))
IfTrueAction3=[!SetOption MeterRepeat ImageTint "#RED#""][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
IfCondition4=((MeasureRepeat=0)&&(#Repeat#=1))
IfTrueAction4=[!SetOption MeterRepeat ImageTint "#RED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition5=((MeasureRepeat=1)&&(#Repeat#=1))
IfTrueAction5=[!SetOption MeterRepeat ImageTint "#GREY#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition6=((MeasureRepeat=2)&&(#Repeat#=1))
IfTrueAction6=[!SetOption MeterRepeat ImageTint "#BRED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
DynamicVariables=1

;-----[Song Volume]-----

[MeasureVolume]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Volume
MinValue=0
MaxValue=100
IfCondition=MeasureVolume = 0
IfTrueAction=[!SetOption MeterVolumeIcon ImageName "#@#Images\volMute.png"]
IfCondition2=(MeasureVolume >= 1) && (MeasureVolume <= 32)
IfTrueAction2=[!SetOption MeterVolumeIcon ImageName "#@#Images\volLow.png"]
IfCondition3=(MeasureVolume >= 33) && (MeasureVolume <= 65)
IfTrueAction3=[!SetOption MeterVolumeIcon ImageName "#@#Images\volMed.png"]
IfCondition4=MeasureVolume >= 66
IfTrueAction4=[!SetOption MeterVolumeIcon ImageName "#@#Images\volHigh.png"]

[MeasureVolumePercentage]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Volume
Substitute="":"N/A"

[MeterVolumeIcon]
Meter=Image
ImageName=#@#Images\volMute.png
ImageTint=#RED#
X=(103*#Scale#)
Y=(85*#Scale#)
W=(17*#Scale#)
H=(17*#Scale#)
LeftMouseUpAction=[!CommandMeasure MeasureVolume "SetVolume 0"]
AntiAlias=1

[MeterVolumeBar]
Meter=Bar
MeasureName=MeasureVolume
BarOrientation=Horizontal
BarColor=#RED#
SolidColor=#DarkBlue#
X=(120*#Scale#)
Y=(93*#Scale#)
W=(95*#Scale#)
H=(1.5*#Scale#)
LeftMouseUpAction=[!CommandMeasure MeasureVolume "SetVolume $MouseX:%$"]

[MeterVolume]
Meter=String
MeasureName=MeasureVolumePercentage
StringAlign=Center
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(5*#Scale#)
X=(226*#Scale#)
Y=(91*#Scale#)
Text=%1%
AntiAlias=1
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16322
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Music player infinite text flow

Post by balala »

Kaizenitsune wrote: December 15th, 2022, 7:12 pm So my plan is that the normal color is Grey, when I hover over it with the mouse it is BRED and when I click on it it is RED, I have already named the colors under Variables and given them the correct color as assignment. Therefore it would also be desirable if I sometime the colors DarkBlue, AlmostBlack and AlmostWhite disappear completely from the code. So that it is uniform I colored all used Icons white, these I will add also again as appendix.
I rewrote a few things in the [MeasureHeartRaw] and [MeterHeart], [MeasureShuffle] and [MeterShuffle] and finally [MeasureRepeat] and [MeterRepeat] sections. There still were some issues, see below. Here are the mentioned sections, please replace the ones you have with these:

Code: Select all

;-----[Song Heart]-----

[MeasureHeartRaw]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Rating
IfCondition=((MeasureHeartRaw=0)&&(#Heart#=0))
IfTrueAction=[!SetOption MeterHeart ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition2=((MeasureHeartRaw=5)&&(#Heart#=0))
IfTrueAction2=[!SetOption MeterHeart ImageTint "#RED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition3=((MeasureHeartRaw=0)&&(#Heart#=1))
IfTrueAction3=[!SetOption MeterHeart ImageTint "#BRED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition4=((MeasureHeartRaw=5)&&(#Heart#=1))
IfTrueAction4=[!SetOption MeterHeart ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
DynamicVariables=1

[MeasureHeart]
Measure=Calc
Formula=(MeasureHeartRaw=5 ? 0 : 5)

[MeterHeart]
Meter=Image
ImageName=#@#images\heart.png
ImageTint=#AlmostWhite#
X=(145*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
LeftMouseDownAction=[!SetOption MeterHeart ImageTint "#RED#"][!UpdateMeter "MeterHeart"][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasureHeartRaw "SetRating [&MeasureHeart]"][!DisableMeasure "MeasureHeartRaw"][!UpdateMeasure "MeasureHeartRaw"][!EnableMeasure "MeasureHeartRaw"][!UpdateMeasure "MeasureHeartRaw"]
AntiAlias=1
MouseOverAction=[!SetVariable Heart "1"][!UpdateMeasure "MeasureHeartRaw"]
MouseLeaveAction=[!SetVariable Heart "0"][!UpdateMeasure "MeasureHeartRaw"]
SolidColor=0,0,0,1

;-----[Song Shuffle]-----

[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Shuffle
;IfCondition=MeasureShuffle = 0
IfCondition=((MeasureShuffle=0)&&(#Shuffle#=0))
IfTrueAction=[!SetVariable Valami "1"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition2=((MeasureShuffle=5)&&(#Shuffle#=0))
IfTrueAction2=[!SetVariable Valami "2"][!SetOption MeterShuffle ImageTint "#RED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition3=((MeasureShuffle=0)&&(#Shuffle#=1))
IfTrueAction3=[!SetVariable Valami "3"][!SetOption MeterShuffle ImageTint "#BRED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition4=((MeasureShuffle=5)&&(#Shuffle#=1))
IfTrueAction4=[!SetVariable Valami "4"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
DynamicVariables=1

[MeterShuffle]
Meter=Image
ImageName=#@#Images\shuffle.png
X=(160*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
Group=DynamicColors
LeftMouseDownAction=[!SetOption MeterShuffle ImageTint "#RED#"][!UpdateMeter "MeterShuffle"][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasureShuffle "Shuffle"][!DisableMeasure "MeasureShuffle"][!UpdateMeasure "MeasureShuffle"][!EnableMeasure "MeasureShuffle"][!UpdateMeasure "MeasureShuffle"]
AntiAlias=1
MouseOverAction=[!SetVariable Shuffle "1"][!UpdateMeasure "MeasureShuffle"]
MouseLeaveAction=[!SetVariable Shuffle "0"][!UpdateMeasure "MeasureShuffle"]
SolidColor=0,0,0,1

;-----[Song Repeat]-----

[MeasureRepeat]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Repeat
IfCondition=((MeasureRepeat=0)&&(#Repeat#=0))
IfTrueAction=[!SetOption MeterRepeat ImageTint "#GREY#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition2=((MeasureRepeat=1)&&(#Repeat#=0))
IfTrueAction2=[!SetOption MeterRepeat ImageTint "#RED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition3=((MeasureRepeat=2)&&(#Repeat#=0))
IfTrueAction3=[!SetOption MeterRepeat ImageTint "#RED#""][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
IfCondition4=((MeasureRepeat=0)&&(#Repeat#=1))
IfTrueAction4=[!SetOption MeterRepeat ImageTint "#RED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition5=((MeasureRepeat=1)&&(#Repeat#=1))
IfTrueAction5=[!SetOption MeterRepeat ImageTint "#GREY#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition6=((MeasureRepeat=2)&&(#Repeat#=1))
IfTrueAction6=[!SetOption MeterRepeat ImageTint "#BRED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
DynamicVariables=1

[MeterRepeat]
Meter=Image
ImageName=#@#Images\shuffle.png
X=(175*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
Group=DynamicColors
LeftMouseDownAction=[!SetOption MeterRepeat ImageTint "#RED#"][!UpdateMeter "MeterRepeat"][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasureRepeat "Repeat"][!DisableMeasure "MeasureRepeat"][!UpdateMeasure "MeasureRepeat"][!EnableMeasure "MeasureRepeat"][!UpdateMeasure "MeasureRepeat"]
AntiAlias=1
MouseOverAction=[!SetVariable Repeat "1"][!UpdateMeasure "Measurerepeat"]
MouseLeaveAction=[!SetVariable  Repeat "0"][!UpdateMeasure "MeasureRepeat"]
SolidColor=0,0,0,1
;IfCondition=((MeasureRepeat=0)&&(#Repeat#=0))
;IfTrueAction=[!SetOption MeterRepeat ImageTint "#GREY#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
;IfCondition2=((MeasureRepeat=1)&&(#Repeat#=0))
;IfTrueAction2=[!SetOption MeterRepeat ImageTint "#RED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
;IfCondition3=((MeasureRepeat=2)&&(#Repeat#=0))
;IfTrueAction3=[!SetOption MeterRepeat ImageTint "#RED#""][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
;IfCondition4=((MeasureRepeat=0)&&(#Repeat#=1))
;IfTrueAction4=[!SetOption MeterRepeat ImageTint "#RED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
;IfCondition5=((MeasureRepeat=1)&&(#Repeat#=1))
;IfTrueAction5=[!SetOption MeterRepeat ImageTint "#GREY#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
;IfCondition6=((MeasureRepeat=2)&&(#Repeat#=1))
;IfTrueAction6=[!SetOption MeterRepeat ImageTint "#BRED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
;DynamicVariables=1
Note the followings:
  • I added LeftMouseDownAction options to all three meters ([MeterHeart], [MeterShuffle] and [MeterRepeat]).These options are setting new color for themselves when you click (to be precise when you press the button of the mouse).
  • Added a few bangs to the existing LeftMouseUpAction options of the same meters, to get back the appropriate colors when you're releasing the button. These bangs are just added to the already existing !CommandMeasure bangs, make sure not to remove them.
  • Moved the IfCondition / IfTrueAction - IfCondition6 / IfTrueAction6 options from the [MeterRepeat] meter to the [MeasureRepeat] measure (in fact I copied and commented them out on the meter). IfConditions are valid ON MEASURES, and can't be used on meters. You added them in vain, they don't work on meters.
Please test the above code to see if it matches your need / expectation.
Kaizenitsune wrote: December 15th, 2022, 7:12 pm For the time being, I have deliberately used Play, Pause etc.. NOT colored, because they work through ImageTint.
When we get the above three buttons working as expected, we'll see what to do with these buttons as well. First I'd like to finish the work with the three buttons.
Kaizenitsune
Posts: 33
Joined: December 9th, 2022, 3:25 am

Re: Music player infinite text flow

Post by Kaizenitsune »

balala wrote: December 15th, 2022, 8:31 pm I rewrote a few things in the [MeasureHeartRaw] and [MeterHeart], [MeasureShuffle] and [MeterShuffle] and finally [MeasureRepeat] and [MeterRepeat] sections. There still were some issues, see below. Here are the mentioned sections, please replace the ones you have with these:

Code: Select all

;-----[Song Heart]-----

[MeasureHeartRaw]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Rating
IfCondition=((MeasureHeartRaw=0)&&(#Heart#=0))
IfTrueAction=[!SetOption MeterHeart ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition2=((MeasureHeartRaw=5)&&(#Heart#=0))
IfTrueAction2=[!SetOption MeterHeart ImageTint "#RED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition3=((MeasureHeartRaw=0)&&(#Heart#=1))
IfTrueAction3=[!SetOption MeterHeart ImageTint "#BRED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition4=((MeasureHeartRaw=5)&&(#Heart#=1))
IfTrueAction4=[!SetOption MeterHeart ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
DynamicVariables=1

[MeasureHeart]
Measure=Calc
Formula=(MeasureHeartRaw=5 ? 0 : 5)

[MeterHeart]
Meter=Image
ImageName=#@#images\heart.png
ImageTint=#AlmostWhite#
X=(145*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
LeftMouseDownAction=[!SetOption MeterHeart ImageTint "#RED#"][!UpdateMeter "MeterHeart"][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasureHeartRaw "SetRating [&MeasureHeart]"][!DisableMeasure "MeasureHeartRaw"][!UpdateMeasure "MeasureHeartRaw"][!EnableMeasure "MeasureHeartRaw"][!UpdateMeasure "MeasureHeartRaw"]
AntiAlias=1
MouseOverAction=[!SetVariable Heart "1"][!UpdateMeasure "MeasureHeartRaw"]
MouseLeaveAction=[!SetVariable Heart "0"][!UpdateMeasure "MeasureHeartRaw"]
SolidColor=0,0,0,1

;-----[Song Shuffle]-----

[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Shuffle
;IfCondition=MeasureShuffle = 0
IfCondition=((MeasureShuffle=0)&&(#Shuffle#=0))
IfTrueAction=[!SetVariable Valami "1"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition2=((MeasureShuffle=5)&&(#Shuffle#=0))
IfTrueAction2=[!SetVariable Valami "2"][!SetOption MeterShuffle ImageTint "#RED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition3=((MeasureShuffle=0)&&(#Shuffle#=1))
IfTrueAction3=[!SetVariable Valami "3"][!SetOption MeterShuffle ImageTint "#BRED#"][!UpdateMeter "MeterHeart"][!Redraw]
IfCondition4=((MeasureShuffle=5)&&(#Shuffle#=1))
IfTrueAction4=[!SetVariable Valami "4"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterHeart"][!Redraw]
DynamicVariables=1

[MeterShuffle]
Meter=Image
ImageName=#@#Images\shuffle.png
X=(160*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
Group=DynamicColors
LeftMouseDownAction=[!SetOption MeterShuffle ImageTint "#RED#"][!UpdateMeter "MeterShuffle"][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasureShuffle "Shuffle"][!DisableMeasure "MeasureShuffle"][!UpdateMeasure "MeasureShuffle"][!EnableMeasure "MeasureShuffle"][!UpdateMeasure "MeasureShuffle"]
AntiAlias=1
MouseOverAction=[!SetVariable Shuffle "1"][!UpdateMeasure "MeasureShuffle"]
MouseLeaveAction=[!SetVariable Shuffle "0"][!UpdateMeasure "MeasureShuffle"]
SolidColor=0,0,0,1

;-----[Song Repeat]-----

[MeasureRepeat]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Repeat
IfCondition=((MeasureRepeat=0)&&(#Repeat#=0))
IfTrueAction=[!SetOption MeterRepeat ImageTint "#GREY#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition2=((MeasureRepeat=1)&&(#Repeat#=0))
IfTrueAction2=[!SetOption MeterRepeat ImageTint "#RED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition3=((MeasureRepeat=2)&&(#Repeat#=0))
IfTrueAction3=[!SetOption MeterRepeat ImageTint "#RED#""][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
IfCondition4=((MeasureRepeat=0)&&(#Repeat#=1))
IfTrueAction4=[!SetOption MeterRepeat ImageTint "#RED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition5=((MeasureRepeat=1)&&(#Repeat#=1))
IfTrueAction5=[!SetOption MeterRepeat ImageTint "#GREY#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition6=((MeasureRepeat=2)&&(#Repeat#=1))
IfTrueAction6=[!SetOption MeterRepeat ImageTint "#BRED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
DynamicVariables=1

[MeterRepeat]
Meter=Image
ImageName=#@#Images\shuffle.png
X=(175*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
Group=DynamicColors
LeftMouseDownAction=[!SetOption MeterRepeat ImageTint "#RED#"][!UpdateMeter "MeterRepeat"][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasureRepeat "Repeat"][!DisableMeasure "MeasureRepeat"][!UpdateMeasure "MeasureRepeat"][!EnableMeasure "MeasureRepeat"][!UpdateMeasure "MeasureRepeat"]
AntiAlias=1
MouseOverAction=[!SetVariable Repeat "1"][!UpdateMeasure "Measurerepeat"]
MouseLeaveAction=[!SetVariable  Repeat "0"][!UpdateMeasure "MeasureRepeat"]
SolidColor=0,0,0,1
;IfCondition=((MeasureRepeat=0)&&(#Repeat#=0))
;IfTrueAction=[!SetOption MeterRepeat ImageTint "#GREY#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
;IfCondition2=((MeasureRepeat=1)&&(#Repeat#=0))
;IfTrueAction2=[!SetOption MeterRepeat ImageTint "#RED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
;IfCondition3=((MeasureRepeat=2)&&(#Repeat#=0))
;IfTrueAction3=[!SetOption MeterRepeat ImageTint "#RED#""][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
;IfCondition4=((MeasureRepeat=0)&&(#Repeat#=1))
;IfTrueAction4=[!SetOption MeterRepeat ImageTint "#RED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
;IfCondition5=((MeasureRepeat=1)&&(#Repeat#=1))
;IfTrueAction5=[!SetOption MeterRepeat ImageTint "#GREY#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
;IfCondition6=((MeasureRepeat=2)&&(#Repeat#=1))
;IfTrueAction6=[!SetOption MeterRepeat ImageTint "#BRED#"][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
;DynamicVariables=1
So everything works as desired, however there are still a few small things, if I hover over the heart bottun over it becomes as desired BRED and if I click on it RED, but if I hover then over it becomes GREY, that was because of the IfTrueAction4, as I had entered there BRED works as desired.
The shuffle button is a bit buggy sometimes it changes the color to RED and sometimes it stays GREY. I already tried to replace GREY with RED and [!UpdateMeter "MeterHeart"] with [!UpdateMeter "MeterShuffle"], but without success. Hovering over it before clicking on it works as desired since it becomes BRED, but after clicking on it it seems to be buggy.
The Repeat button also works as desired, there I had to exchange only once GREY by BRED, because it became GREY again after I clicked once on it and then hovered over it.

Accordingly, everything works as desired except the shuffle button.
balala wrote: December 15th, 2022, 8:31 pm When we get the above three buttons working as expected, we'll see what to do with these buttons as well. First I'd like to finish the work with the three buttons.
And yes the other buttons are the smaller problems, which I will also create alone with the current knowledge
User avatar
balala
Rainmeter Sage
Posts: 16322
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Music player infinite text flow

Post by balala »

Kaizenitsune wrote: December 15th, 2022, 11:14 pm if I hover over the heart bottun over it becomes as desired BRED and if I click on it RED, but if I hover then over it becomes GREY, that was because of the IfTrueAction4, as I had entered there BRED works as desired.
So, [MeterHeart] behaves as expected when you're hovering the mouse over it and clicking. What is not clear how can you hover the mouse once again to it, for this first you have to leave it. In this moment it becomes grey, when you're hovering the mouse once again over it, it becomes red again. This is what I see, not sure how can you hover the mouse once again over, without leaving it.
Kaizenitsune wrote: December 15th, 2022, 11:14 pm The shuffle button is a bit buggy sometimes it changes the color to RED and sometimes it stays GREY. I already tried to replace GREY with RED and [!UpdateMeter "MeterHeart"] with [!UpdateMeter "MeterShuffle"], but without success. Hovering over it before clicking on it works as desired since it becomes BRED, but after clicking on it it seems to be buggy.
Yep, indeed the [!UpdateMeter "MeterHeart"] bang has to be replaced by [!UpdateMeter "MeterShuffle"], what you did, as I understand. This has been a copying, then not-modifying problem from my part. My bad, sorry...
But I tried this a few times right now and it never stayed grey. Its color is always changing to red (in fact to BRED) when I'm hovering the mouse over it. Don't really know what to say, since I can't replicate the issue.
Kaizenitsune wrote: December 15th, 2022, 11:14 pm The Repeat button also works as desired, there I had to exchange only once GREY by BRED, because it became GREY again after I clicked once on it and then hovered over it.
The IfConditions added to the [MeasureRepeat] measure are the ones wrongly added by you to the [MeterRepeat] meter. I just copied them here. But obviously you can modify the options as you want.
Kaizenitsune wrote: December 15th, 2022, 11:14 pm And yes the other buttons are the smaller problems, which I will also create alone with the current knowledge
Good point, please do so and if any question arises, feel free to come back with it.
Kaizenitsune
Posts: 33
Joined: December 9th, 2022, 3:25 am

Re: Music player infinite text flow

Post by Kaizenitsune »

balala wrote: December 16th, 2022, 7:32 pm Yep, indeed the [!UpdateMeter "MeterHeart"] bang has to be replaced by [!UpdateMeter "MeterShuffle"], what you did, as I understand. This has been a copying, then not-modifying problem from my part. My bad, sorry...
But I tried this a few times right now and it never stayed grey. Its color is always changing to red (in fact to BRED) when I'm hovering the mouse over it. Don't really know what to say, since I can't replicate the issue.
I hope this shows the said problem with the shuffle button, I made what we are working on here in a new file so I still have a music player that works 100%. In both images the shuffle mode is activated, but the shuffle button behaves differently in both images even though I click on it only once.

Here again the code only from the shuffle button that we or you have worked out

Code: Select all

;-----[Song Shuffle]-----

[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Shuffle
;IfCondition=MeasureShuffle = 0
IfCondition=((MeasureShuffle=0)&&(#Shuffle#=0))
IfTrueAction=[!SetVariable Valami "1"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterShuffle"][!Redraw]
IfCondition2=((MeasureShuffle=5)&&(#Shuffle#=0))
IfTrueAction2=[!SetVariable Valami "2"][!SetOption MeterShuffle ImageTint "#RED#"][!UpdateMeter "MeterShuffle"][!Redraw]
IfCondition3=((MeasureShuffle=0)&&(#Shuffle#=1))
IfTrueAction3=[!SetVariable Valami "3"][!SetOption MeterShuffle ImageTint "#BRED#"][!UpdateMeter "MeterShuffle"][!Redraw]
IfCondition4=((MeasureShuffle=5)&&(#Shuffle#=1))
IfTrueAction4=[!SetVariable Valami "4"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterShuffle"][!Redraw]
DynamicVariables=1

[MeterShuffle]
Meter=Image
ImageName=#@#Images\shuffle.png
X=(160*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
Group=DynamicColors
LeftMouseDownAction=[!SetOption MeterShuffle ImageTint "#RED#"][!UpdateMeter "MeterShuffle"][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasureShuffle "Shuffle"][!DisableMeasure "MeasureShuffle"][!UpdateMeasure "MeasureShuffle"][!EnableMeasure "MeasureShuffle"][!UpdateMeasure "MeasureShuffle"]
AntiAlias=1
MouseOverAction=[!SetVariable Shuffle "1"][!UpdateMeasure "MeasureShuffle"]
MouseLeaveAction=[!SetVariable Shuffle "0"][!UpdateMeasure "MeasureShuffle"]
SolidColor=0,0,0,1
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16322
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Music player infinite text flow

Post by balala »

Kaizenitsune wrote: December 17th, 2022, 12:06 am I hope this shows the said problem with the shuffle button, I made what we are working on here in a new file so I still have a music player that works 100%. In both images the shuffle mode is activated, but the shuffle button behaves differently in both images even though I click on it only once.
Not sure what to say, because I'm not using Spotify, so can't be entirely sure, but try replacing the [MeasureShuffle] measure and the [MeterShuffle] meter with the following ones:

Code: Select all

[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Shuffle
IfCondition=((MeasureShuffle=0)&&(#Shuffle#=0))
IfTrueAction=[!SetVariable Shf "Grey"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
IfCondition2=((MeasureShuffle=5)&&(#Shuffle#=0))
IfTrueAction2=[!SetVariable Shf "Red"][!SetOption MeterShuffle ImageTint "#RED#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
IfCondition3=((MeasureShuffle=0)&&(#Shuffle#=1))
IfTrueAction3=[!SetVariable Shf "BRed"][!SetOption MeterShuffle ImageTint "#BRED#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
IfCondition4=((MeasureShuffle=5)&&(#Shuffle#=1))
IfTrueAction4=[!SetVariable Shf "Grey2"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
DynamicVariables=1

[MeterShuffle]
Meter=Image
ImageName=#@#Images\shuffle.png
X=(160*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
Group=DynamicColors
LeftMouseDownAction=[!SetVariable Shf "Red2"][!SetOption MeterShuffle ImageTint "#RED#"][!DisableMeasure "MeasureShuffle"][!UpdateMeasure "MeasureShuffle"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasureShuffle "Shuffle"][!EnableMeasure "MeasureShuffle"][!UpdateMeasure "MeasureShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
AntiAlias=1
MouseOverAction=[!SetVariable Shuffle "1"][!UpdateMeasure "MeasureShuffle"]
MouseLeaveAction=[!SetVariable Shuffle "0"][!UpdateMeasure "MeasureShuffle"]
SolidColor=0,0,0,1
See that I moved two bangs (!DisableMeasure and the first !UpdateMeasure) from the LeftMouseUpAction option to the LeftMouseDownAction of the [MeterShuffle] meter. This way we completely avoid the color change due to the IfCondition options of the [MeasureShuffle] measure, while you're clicking. The Shf variable, set into the four IfTrueAction options of the [MeasureShuffle] measure and the LeftMouseDownAction option of the [MeterShuffle] meter, is used to indicate the case which sets the color of the button. To see what1s going on with this variable, add the following String meter, to the end of your code:

Code: Select all

[MeterShowShuffle]
Meter=STRING
MeasureName=MeasureShuffle
X=5
Y=5
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Color: #Shf##CRLF#MeasureShuffle: %1#CRLF#Shuffle: #Shuffle#
DynamicVariables=1
See that this meter shows up the:
  • Color set for the button. For this it uses the Shf variable, set to Grey, Red, BRed, Grey2 and Red2, by the appropriate !SetVariable bangs. Outside of Grey, Red and BRed (the color set for the button), I added two more values, which don't have a corresponding color (Grey2 and Red2). This lets you to distinguish between the five cases in which the color is set.
  • The value returned by the [MeasureShuffle] measure.
  • The value of the Shuffle variable, which has to change when you1re hovering the mouse over the [MeterShuffle] meter, and when you're leaving it.
Following the values which can be seen in the [MeterShowShuffle] meter, you can easily find out where the problem is when something is going wrong on color changing.
Could you using this approach, find what's going on, why the color is not changing properly?
Kaizenitsune
Posts: 33
Joined: December 9th, 2022, 3:25 am

Re: Music player infinite text flow

Post by Kaizenitsune »

balala wrote: December 17th, 2022, 8:19 pm Could you using this approach, find what's going on, why the color is not changing properly?
Ok, I tried it with the [MeterShowShuffle] and the result is really strange, MeasureShuffle jumps as wanted from 0 to 1 and from 1 to 0, that fits only the color just does not want. It's also not that it somehow becomes GREY once and BRED once, that's completely random.

This is once the code that I use in my current music player, this is virtually the raw form on which everything else was built what we or you have worked out here.

This works as desired, I press on it it becomes RED, I press again on it it becomes GREY or in the case another color, which is not so bad now, because it is exchanged as soon as here everything works 100% as desired.

Here, of course, is not the feature with the mousehover with.

Code: Select all

;-----[Song Shuffle]-----

[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Shuffle
IfCondition=MeasureShuffle = 0
IfTrueAction=[!SetOption MeterShuffle ImageTint "#MediumBlue#"]
IfCondition2=MeasureShuffle = 1
IfTrueAction2=[!SetOption MeterShuffle ImageTint "#AlmostWhite#"]

[MeterShuffle]
Meter=Image
ImageName=#@#Images\shuffle.png
ImageTint=#AlmostWhite#
X=(160*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
Group=DynamicColors
LeftMouseUpAction=[!CommandMeasure MeasureShuffle "Shuffle"]
AntiAlias=1
User avatar
balala
Rainmeter Sage
Posts: 16322
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Music player infinite text flow

Post by balala »

Kaizenitsune wrote: December 17th, 2022, 10:17 pm

Code: Select all

;-----[Song Shuffle]-----

[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Shuffle
IfCondition=MeasureShuffle = 0
IfTrueAction=[!SetOption MeterShuffle ImageTint "#MediumBlue#"]
IfCondition2=MeasureShuffle = 1
IfTrueAction2=[!SetOption MeterShuffle ImageTint "#AlmostWhite#"]

[MeterShuffle]
Meter=Image
ImageName=#@#Images\shuffle.png
ImageTint=#AlmostWhite#
X=(160*#Scale#)
Y=(75*#Scale#)
W=(15*#Scale#)
H=(15*#Scale#)
Group=DynamicColors
LeftMouseUpAction=[!CommandMeasure MeasureShuffle "Shuffle"]
AntiAlias=1
There is an important difference between the two codes (the above one and the previously posted one). Now checking out discussion, this might be my fault. At the beginning, the [MeasureShuffle] measure has been compared by 0 and 1, in the appropriate IfConditions. But then suddenly it became compared by 0 and 5. As said, I think this is my fault, I am the one who did this stupid mistake here. My bad, sorry for it...
So since I think the comparison with 5 is completely wrong, you should try replacing for first the previous (let's say more "complicated") measure with the following one:

Code: Select all

[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Shuffle
IfCondition=((MeasureShuffle=0)&&(#Shuffle#=0))
IfTrueAction=[!SetVariable Shf "Grey"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
IfCondition2=((MeasureShuffle=1)&&(#Shuffle#=0))
IfTrueAction2=[!SetVariable Shf "Red"][!SetOption MeterShuffle ImageTint "#RED#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
IfCondition3=((MeasureShuffle=0)&&(#Shuffle#=1))
IfTrueAction3=[!SetVariable Shf "BRed"][!SetOption MeterShuffle ImageTint "#BRED#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
IfCondition4=((MeasureShuffle=1)&&(#Shuffle#=1))
IfTrueAction4=[!SetVariable Shf "Grey2"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
DynamicVariables=1
As you can see the only thing I did here is the replacement of the (MeasureShuffle=5) condition by (MeasureShuffle=1). Please try out this new variant and let me know how is it working.
Same applies for the [MeasureHeartRaw] measure as well, whose comparation has also been replaced mistakenly. If needed, please rewrite the comparation of this measure as well.
Sorry for this stupid mistake. My mistake...
Kaizenitsune
Posts: 33
Joined: December 9th, 2022, 3:25 am

Re: Music player infinite text flow

Post by Kaizenitsune »

balala wrote: December 18th, 2022, 4:07 pm There is an important difference between the two codes (the above one and the previously posted one). Now checking out discussion, this might be my fault. At the beginning, the [MeasureShuffle] measure has been compared by 0 and 1, in the appropriate IfConditions. But then suddenly it became compared by 0 and 5. As said, I think this is my fault, I am the one who did this stupid mistake here. My bad, sorry for it...
So since I think the comparison with 5 is completely wrong, you should try replacing for first the previous (let's say more "complicated") measure with the following one:

Code: Select all

[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Shuffle
IfCondition=((MeasureShuffle=0)&&(#Shuffle#=0))
IfTrueAction=[!SetVariable Shf "Grey"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
IfCondition2=((MeasureShuffle=1)&&(#Shuffle#=0))
IfTrueAction2=[!SetVariable Shf "Red"][!SetOption MeterShuffle ImageTint "#RED#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
IfCondition3=((MeasureShuffle=0)&&(#Shuffle#=1))
IfTrueAction3=[!SetVariable Shf "BRed"][!SetOption MeterShuffle ImageTint "#BRED#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
IfCondition4=((MeasureShuffle=1)&&(#Shuffle#=1))
IfTrueAction4=[!SetVariable Shf "Grey2"][!SetOption MeterShuffle ImageTint "#GREY#"][!UpdateMeter "MeterShuffle"][!UpdateMeter "MeterShowShuffle"][!Redraw]
DynamicVariables=1
As you can see the only thing I did here is the replacement of the (MeasureShuffle=5) condition by (MeasureShuffle=1). Please try out this new variant and let me know how is it working.
Same applies for the [MeasureHeartRaw] measure as well, whose comparation has also been replaced mistakenly. If needed, please rewrite the comparation of this measure as well.
Sorry for this stupid mistake. My mistake...
Do not worry about it, I could have also noticed that there is 5, I was also not attentive.
Now it works in any case.

Now that that's checked off, I'd like to look at the Volume Bar again, there would be 2 things, once the background of the unfilled bar and then once that at the end of the bar that indicates how loud it is is an ellipsis like the Song Progress Bar.

Here is the code of the Song Progress Bar

Code: Select all

[MeterBar]
Meter=Shape
X=(105*#Scale#)
Y=(70*#Scale#)
Shape=Rectangle 0,0,(130*#Scale#),(1.5*#Scale#),0 | Fill Color 255,255,255,30 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*1.2*#Scale#),(1.5*#Scale#),0 | Fill Color 211,40,56 | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*1.2*#Scale#),(0.8*#Scale#),(1.5*#Scale#) |Fill Color 255,255,255 | StrokeWidth 0
Shape4=Rectangle 0,(-1*#Scale#),(120*#Scale#),(3*#Scale#),0 | Fill Color 255,255,255,1 | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]
And here once the code to the volume bar

Code: Select all

[MeterVolumeBar]
Meter=Bar
MeasureName=MeasureVolume
BarOrientation=Horizontal
BarColor=#RED#
SolidColor=#DarkBlue#
X=(120*#Scale#)
Y=(93*#Scale#)
W=(95*#Scale#)
H=(1.5*#Scale#)
LeftMouseUpAction=[!CommandMeasure MeasureVolume "SetVolume $MouseX:%$"]
The shapes are only defined in [MeterBar] before nothing was defined there.
I had already tried to simply copy & paste the shapes, but that would have been too nice if that had worked directly, of course I then replaced [MeasureProgress] with [MeasureVolume], but of course that didn't work.