Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 716

Help: Rainmeter Skins • Re: Help

$
0
0
Hey Yincognito, this link https://forum.rainmeter.net/viewtopic.php?t=31790 is the reason why I know that what I want to do is possible, I saw it long time ago and I tried it, but I couldn't make it work for the music, I mean the same way I explain in the video I shared
I could make a simple sample illustrating the key principles.
Alright, looks like the stuff I was busy with today was eventually postponed, so got some time and as promised, the simplest example (reduced to basics from here):

Code:

[Variables]PlayerName=WinampUpdate=25Delay=3000Step=1[Rainmeter]Update=#Update#AccurateText=1DynamicWindowSize=1---Measures---[Title]Measure=PluginPlugin=NowPlayingPlayerName=#PlayerName#PlayerType=TitleRegExpSubstitute=1Substitute="^$":"None"[Artist]Measure=PluginPlugin=NowPlayingPlayerName=[Title]PlayerType=ArtistRegExpSubstitute=1Substitute="^$":"None"[Album]Measure=PluginPlugin=NowPlayingPlayerName=[Title]PlayerType=AlbumRegExpSubstitute=1Substitute="^$":"None"[Info]Measure=StringString=[Title] - [Artist] - [Album]RegExpSubstitute=1Substitute="^None - None - None$":"Nothing Playing"OnChangeAction=[!DisableMeasure Position][!UpdateMeasure Position][!UpdateMeter Text][!Redraw][!EnableMeasure Position]DynamicVariables=1[Position]Measure=CalcFormula=([Text:W]-[Container:W]>0?Position+#Step#:[Container:W])IfCondition=(Position<0)||(Position>[Text:W]+[Container:W])IfTrueAction=[!DisableMeasure Position][!UpdateMeasure Position][!EnableMeasure Position]IfCondition2=(Position>=[Container:W])IfTrueAction2=[!PauseMeasure Position][!Delay #Delay#][!UnpauseMeasure Position]DynamicVariables=1---Meters---[Shape]Meter=ShapeShape=Rectangle 1,1,208,30 | Fill Color 0,0,0,128 | StrokeWidth 2 | Stroke Color 128,128,128,255[Container]Meter=ImageX=5Y=1W=200H=30SolidColor=0,0,0,255[Text]Container=ContainerMeter=StringX=([Container:W]-[Position])Y=1FontFace=Segoe UIFontSize=13FontColor=255,255,255,255AntiAlias=1MeasureName=InfoText=%1DynamicVariables=1
It's not precisely what you wanted, but bar building a very long string of space separated "[Title] - [Artist] - [Album]" parts in [Info] and sliding it till the track changes, there is no feasible way to place the next sliding such part right after the previous one (i.e. got to wait till the text disappears to reset its position and slide it again). Also, starting with the sliding from the 0 position at the left creates other complications when resetting the text position to make it look like the sliding is continuous, so it has to start from the [Container:W] position at the right.

The rest is self explanatory in terms of names (bar [Position] which is actually computed from [Container:W] towards the left and it's always positive, so it's kind of inverted compared to what you'd expect), and the few formulas are obvious if you draw a brief schematic on a piece of paper for say, container width of 200 and text width of 250. The text currently doesn't slide if it's narrower than the width of the container, so if you want that too, just change to Formula=(Position+#Step#) in [Position].

As for implementing something similar in your skin, that's up to you - the sample is there to serve as an inspiration and you know best what you have in your skin and how that suits what you envision it to be. Feel free to ask if you don't understand something in the above sample. ;-)

Statistics: Posted by Yincognito — Yesterday, 8:02 pm



Viewing all articles
Browse latest Browse all 716

Trending Articles