It is currently September 18th, 2024, 1:22 pm
Help
-
- Posts: 33
- Joined: May 11th, 2024, 3:57 am
Re: Help
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 believe me I tried many forms and many ways and nothing worked, that's why I gave up on it, the reason is that the code has so many parameters that I don't understand at all, I don't know how it works indeed... sorry guys, but I really tried
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Help
No need to give up, as it's entirely possible. Personally, I wouldn't dwelve into the long code you posted, but I could make a simple sample illustrating the key principles. Thing is, I have some things to do these days, so unless balala is giving a shot at it, I can't guarantee when I'll post it. So, in the meantime, try to understand the ActionTimer details in the manual, because if you don't try to do it, nobody else can do it for you (I mean the understanding part, not necessarily implementing more complex things). I'll come back to this when I can - that doesn't stop you from trying simpler things to get the idea though.Japmc7 wrote: ↑May 30th, 2024, 12:42 am 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 believe me I tried many forms and many ways and nothing worked, that's why I gave up on it, the reason is that the code has so many parameters that I don't understand at all, I don't know how it works indeed... sorry guys, but I really tried
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Help
Japmc7 wrote: ↑May 30th, 2024, 12:42 amHey 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
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):Yincognito wrote: ↑May 30th, 2024, 9:25 amI could make a simple sample illustrating the key principles.
Code: Select all
[Variables]
PlayerName=Winamp
Update=25
Delay=3000
Step=1
[Rainmeter]
Update=#Update#
AccurateText=1
DynamicWindowSize=1
---Measures---
[Title]
Measure=Plugin
Plugin=NowPlaying
PlayerName=#PlayerName#
PlayerType=Title
RegExpSubstitute=1
Substitute="^$":"None"
[Artist]
Measure=Plugin
Plugin=NowPlaying
PlayerName=[Title]
PlayerType=Artist
RegExpSubstitute=1
Substitute="^$":"None"
[Album]
Measure=Plugin
Plugin=NowPlaying
PlayerName=[Title]
PlayerType=Album
RegExpSubstitute=1
Substitute="^$":"None"
[Info]
Measure=String
String=[Title] - [Artist] - [Album]
RegExpSubstitute=1
Substitute="^None - None - None$":"Nothing Playing"
OnChangeAction=[!DisableMeasure Position][!UpdateMeasure Position][!UpdateMeter Text][!Redraw][!EnableMeasure Position]
DynamicVariables=1
[Position]
Measure=Calc
Formula=([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=Shape
Shape=Rectangle 1,1,208,30 | Fill Color 0,0,0,128 | StrokeWidth 2 | Stroke Color 128,128,128,255
[Container]
Meter=Image
X=5
Y=1
W=200
H=30
SolidColor=0,0,0,255
[Text]
Container=Container
Meter=String
X=([Container:W]-[Position])
Y=1
FontFace=Segoe UI
FontSize=13
FontColor=255,255,255,255
AntiAlias=1
MeasureName=Info
Text=%1
DynamicVariables=1
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.
-
- Posts: 33
- Joined: May 11th, 2024, 3:57 am
Re: Help
Hey Yincognito you did an amazing job, I tried your code and almost does what I'm looking for, I tried several combinations and now I know how it works the shape, the container and the text part, but I still don't know how exactly work the position part, I mean I don't get the syntax, but don´t worry. If there no way to make the letters appear again before the whole text scroll, then I would like the code to have this behavior instead of the other...
It's similar to the one you told me I tried to change it by myself but the syntax it's too different from yours, I like yours much better because it's easier to understand, so I'll stick with that, but what parameter should I change to the code to have the new behavior? As I said, I tried many combinations but it wasn't impossible.
It's similar to the one you told me I tried to change it by myself but the syntax it's too different from yours, I like yours much better because it's easier to understand, so I'll stick with that, but what parameter should I change to the code to have the new behavior? As I said, I tried many combinations but it wasn't impossible.
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Help
Just use the "ResetPos" parts from [TrackX] and [M_TRACK] from the code in the link above, into [Position] and [Text] from the code from this thread.Japmc7 wrote: ↑June 1st, 2024, 12:15 am Hey Yincognito you did an amazing job, I tried your code and almost does what I'm looking for, I tried several combinations and now I know how it works the shape, the container and the text part, but I still don't know how exactly work the position part, I mean I don't get the syntax, but don´t worry. If there no way to make the letters appear again before the whole text scroll, then I would like the code to have this behavior instead of the other...
-
- Posts: 33
- Joined: May 11th, 2024, 3:57 am
Re: Help
If you mean something like this...
I did it and it didn't work, I seriously don't get those syntax, I tried like 15 different combinations and the letters either disappear or don't move, after more than 3 hours trying I gave up.
Code: Select all
---Measures---
[Title]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=Title
RegExpSubstitute=1
Substitute="^$":"None"
[Artist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=Artist
RegExpSubstitute=1
Substitute="^$":"None"
[Album]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=Album
RegExpSubstitute=1
Substitute="^$":"None"
[Info]
Measure=String
String=[Title] - [Artist] - [Album]
RegExpSubstitute=1
Substitute="^None - None - None$":"Nothing Playing"
OnChangeAction=[!DisableMeasure Position][!UpdateMeasure Position][!UpdateMeter Text][!Redraw][!EnableMeasure Position]
DynamicVariables=1
[Position]
Measure=Calc
Formula=([M_Artist:W]-[Container:W]>0?ArtistX+#ArtistStep#:ArtistX)
IfCondition=(ArtistX<0)||(ArtistX>[M_Artist:W]-[Container:W])
IfTrueAction=[!DisableMeasure ArtistX][!UpdateMeasure ArtistX][!EnableMeasure ArtistX]
IfCondition2=(Position>=[Container:W])
IfTrueAction2=[!PauseMeasure Position][!Delay #Delay#][!UnpauseMeasure Position]
DynamicVariables=1
---Meters---
[Shape]
Meter=Shape
Shape=Rectangle 1,1,327,23 | Fill Color 0,0,0,128 | StrokeWidth 2 | Stroke Color 0,0,0,1
[Container]
Meter=Image
X=2
Y=1
W=322
H=23
SolidColor=0,0,0,255
[Text]
Container=Container
Meter=String
X=(-[TrackX])
Y=1
FontFace=Arial Rounded MT Bold
FontSize=13
FontColor=255,255,255,255
AntiAlias=1
MeasureName=Info
Text=%1
DynamicVariables=1
-
- Rainmeter Sage
- Posts: 5526
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Help
Here is your code with a few simplifications for missing variables and section names that do not exist in your code.
Code: Select all
---Measures---
[Title]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=Title
RegExpSubstitute=1
Substitute="^$":"None"
OnChangeAction=[!DisableMeasure Position][!UpdateMeasure Position][!UpdateMeter Text][!Redraw][!EnableMeasure Position]
[Artist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=Artist
RegExpSubstitute=1
Substitute="^$":"None"
[Album]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=Album
RegExpSubstitute=1
Substitute="^$":"None"
; [Info]
; Measure=String
; String=[Title] - [Artist] - [Album]
; RegExpSubstitute=1
; Substitute="^None - None - None$":"Nothing Playing"
; OnChangeAction=[!DisableMeasure Position][!UpdateMeasure Position][!UpdateMeter Text][!Redraw][!EnableMeasure Position]
; DynamicVariables=1
[Position]
Measure=Calc
Formula=[Position]+1
IfCondition=[Text:X]<(-[Text:W])
IfTrueAction=[!DisableMeasure Position][!UpdateMeasure Position][!EnableMeasure Position]
DynamicVariables=1
---Meters---
[Shape]
Meter=Shape
Shape=Rectangle 1,1,200,23 | Fill Color 0,0,0,128 | StrokeWidth 2 | Stroke Color 0,0,0,1
[Container]
Meter=Image
X=2
Y=1
W=200
H=23
SolidColor=0,0,0,255
[Text]
Container=Container
Meter=String
X=([Container:W]-[Position])
Y=1
FontFace=Arial Rounded MT Bold
FontSize=13
FontColor=255,255,255,255
AntiAlias=1
Text=[Title] - [Artist] - [Album]
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Help
You only need 5 minutes at most to notice that:
- the measures and meters referenced in the parts I indicated from the link simply don't exist in the code I posted earlier, therefore only copy pasting those parts could never work
- this and the fact that I implied that [TrackX] and [M_TRACK] in the code from the link are more or less equivalents of [Position] and [Text], respectively, in the code I posted earlier, makes it plain obvious that the references to the former in the 4 lines you had to copy paste should be replaced with the references to the latter (just like you easily replaced Winamp in my code with WMP in yours)
Even if I was brief when posting earlier, some things have nothing to do with syntax, math, or any other stuff you might find difficult, and instead are just basic logical choices. A code must have that, it rarely works by luck or random changes.
By the way, you don't need IfCondition2 / IfTrueAction2 anymore, just insert the [!Delay ...] part right before the [!EnableMeasure ...] part, in the code I posted earlier. Also, I intentionally left out a 3rd equivalent between the code from the link and the code I posted earlier, because it's more than obvious and you have all the clues to figure this one on your own. Unless you want to give up again, that is...
EDIT: Well, eclectic-tech just made my "teach the man how to fish" attempt above a lil' bit pointless, but on the other hand, I did reply with a considerable delay, so it's no problem.
-
- Rainmeter Sage
- Posts: 5526
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Help
From his comment, I thought it may help... but I agree that your attempt to teach is the better method
A working example with corrections to his attempt, seem like it may help him, or others who may read this thread.
We'll see if any of this helps .
A working example with corrections to his attempt, seem like it may help him, or others who may read this thread.
We'll see if any of this helps .
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::