It is currently April 18th, 2024, 7:37 am

continuous scrolling RSS feed bar ticker

Get help with creating, editing & fixing problems with skins
User avatar
AnimaliX
Posts: 33
Joined: August 22nd, 2016, 9:22 pm

continuous scrolling RSS feed bar ticker

Post by AnimaliX »

hello, I trying to solve continuous scrolling problem with this skin (modified https://forum.rainmeter.net/viewtopic.php?t=18797):
as you can see it always "twitch" at end...
thanks, any help appreciated

Code: Select all

[Rainmeter]
Update=#Update#
BackgroundMode=2
SolidColor=0, 0, 255,100

[StyleItem]
X=20R
W=500
FontColor=255, 255, 255,255
FontFace=Arial
FontSize=12
StringEffect=Shadow
StringStyle=Bold
StringAlign=Left
AntiAlias=1
ClipString=1
Text="[\9654] %1"

[Variables]
Update=25
OriginalX=1920
TotalMove=2500
Y1=0

[MeasureRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL="https://news.google.com/rss"
RegExp="(?siU).*<item.*>.*<title>(.*)</title>.*<title>(.*)</title>.*<title>(.*)</title>.*<title>(.*)</title>.*<title>(.*)</title>.*"
UpdateRate=20000
StringIndex=1
Debug=0

[MeasureMove]
Measure=Calc
Formula=Counter%#TotalMove#
AverageSize=1

[NewPosition]
Measure=Calc
Formula=#OriginalX#-MeasureMove

[Motor]
Measure=Calc
Formula=Counter%2
IfBelowValue=1
IfBelowAction=!Execute [!RainmeterMoveMeter [NewPosition] #Y1# MeterRSSItem1]
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterMoveMeter [NewPosition] #Y1# MeterRSSItem1]
DynamicVariables=1

[MeasureRSSItem1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureRSS]
StringIndex=1

[MeasureRSSItem2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureRSS]
StringIndex=2

[MeasureRSSItem3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureRSS]
StringIndex=3

[MeasureRSSItem4]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureRSS]
StringIndex=4

[MeasureRSSItem5]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureRSS]
StringIndex=5

[MeterRSSItem1]
Meter=String
MeasureName=MeasureRSSItem1
MeterStyle=StyleItem

[MeterRSSItem2]
Meter=String
MeasureName=MeasureRSSItem2
MeterStyle=StyleItem

[MeterRSSItem3]
Meter=String
MeasureName=MeasureRSSItem3
MeterStyle=StyleItem

[MeterRSSItem4]
Meter=String
MeasureName=MeasureRSSItem4
MeterStyle=StyleItem

[MeterRSSItem5]
Meter=String
MeasureName=MeasureRSSItem5
MeterStyle=StyleItem
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: continuous scrolling RSS feed bar ticker

Post by Yincognito »

AnimaliX wrote: July 10th, 2020, 10:28 am hello, I trying to solve continuous scrolling problem with this skin (modified https://forum.rainmeter.net/viewtopic.php?t=18797):
as you can see it always "twitch" at end...
thanks, any help appreciated
I'll take a look at your code, but in the meantime, you might want to take a look at the Feeds skin from my MYiniMeter suite, as it does this and more. Nowadays it looks much better since I'm using custom tooltips instead of the OS tooltips, but as a proof of concept, it works.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
AnimaliX
Posts: 33
Joined: August 22nd, 2016, 9:22 pm

Re: continuous scrolling RSS feed bar ticker

Post by AnimaliX »

thanks

your work is massive! :) I always trying for simplest skin without scripts etc. for easy maintenance in future, but If I am right you get whole feed source as one "StringIndex" with lot of stripping... hmm one text output maybe can crack multiple problems which I solving right now :)
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: continuous scrolling RSS feed bar ticker

Post by Yincognito »

AnimaliX wrote: July 10th, 2020, 6:11 pm thanks

your work is massive :) I always trying for simplest skin without scripts etc. for easy maintenance in future, but If I am right you get whole feed source as one "StringIndex" with lot of stripping... hmm one text output maybe can crack multiple problems which I solving right now :)
Yeah, don't worry, I'm not saying you should do as I do, I'll update your own code no problem. It's a bit more complicated to explain what happens in my skin, as I also do feed aggregation, but in terms of animation, yes, it's a single string meter.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: continuous scrolling RSS feed bar ticker

Post by balala »

AnimaliX wrote: July 10th, 2020, 10:28 am hello, I trying to solve continuous scrolling problem with this skin (modified https://forum.rainmeter.net/viewtopic.php?t=18797):
as you can see it always "twitch" at end...
thanks, any help appreciated
Add the following meters to your code:

Code: Select all

[MeterRSSItem12]
Meter=String
MeasureName=MeasureRSSItem1
X=([MeterRSSItem1:X]-#TotalMove#)
MeterStyle=StyleItem
DynamicVariables=1

[MeterRSSItem22]
Meter=String
MeasureName=MeasureRSSItem2
MeterStyle=StyleItem

[MeterRSSItem32]
Meter=String
MeasureName=MeasureRSSItem3
MeterStyle=StyleItem

[MeterRSSItem42]
Meter=String
MeasureName=MeasureRSSItem4
MeterStyle=StyleItem

[MeterRSSItem52]
Meter=String
MeasureName=MeasureRSSItem5
MeterStyle=StyleItem
Replace the X=20R option of the [StyleItem] section with X=0R. Following this, you'll get the consecutive meters a little bit closer to each other, but for now you'll have to live with this inconvenient.
Completely remove the absolutely useless [Motor] measure. Finally add the following two options (beside the existing ones) to the [MeterRSSItem1] meter:

Code: Select all

[MeterRSSItem1]
...
X=[NewPosition]
DynamicVariables=1
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: continuous scrolling RSS feed bar ticker

Post by Yincognito »

balala wrote: July 10th, 2020, 7:47 pm Add the following meters to your code:
Did you get memory errors while testing the OP's code? Cause I did (MemoryCompression.exe running high on CPU) and that crashed my computer (and Rainmeter) a couple of times. By comparison, enlarging my own skin to the dimensions of the OP's skin produced no adverse effects.

EDIT: By the way, your code will still produce glitches / twitches / whatever if sum of the widths of every meter (or TotalMove, for that matter) is less than OriginalX (in other words, if the meters are shorter than the total slide width).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: continuous scrolling RSS feed bar ticker

Post by balala »

Yincognito wrote: July 10th, 2020, 8:16 pm Did you get memory errors while testing the OP's code?
No, I didn't.
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: continuous scrolling RSS feed bar ticker

Post by Yincognito »

balala wrote: July 10th, 2020, 8:23 pmNo, I didn't.
Yep, I just did, again - and this time using your code (which otherwise worked as expected, assuming the total width of the meters was more than the sliding width). I suspect what might be the problem, and I'm curious if my guess turns to be correct - if it does, I'll post a safe version of the code.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: continuous scrolling RSS feed bar ticker

Post by balala »

Yincognito wrote: July 10th, 2020, 8:16 pm EDIT: By the way, your code will still produce glitches / twitches / whatever if sum of the widths of every meter (or TotalMove, for that matter) is less than OriginalX (in other words, if the meters are shorter than the total slide width).
I doubt. If I add a SolidColor=255,0,0 option to the newly added [MeterRSSItem12] - [MeterRSSItem52] meters (to can distinguish them from the original meters), this is what I get:
GIF.gif
No glitches as far as I can tell.
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: continuous scrolling RSS feed bar ticker

Post by Yincognito »

balala wrote: July 10th, 2020, 8:48 pm I doubt. If I add a SolidColor=255,0,0 option to the newly added [MeterRSSItem12] - [MeterRSSItem52] meters (to can distinguish them from the original meters), this is what I get:
GIF.gif
No glitches as far as I can tell.
Nah, you didn't understand what I meant. Try the following code, based on your posted suggestions. The only modifications I made was to reduce the width of each meter (simulating shorter feed titles) and also of TotalMove variable accordingly (by a factor of 5):

Code: Select all

[Rainmeter]
Update=#Update#
BackgroundMode=2
SolidColor=0, 0, 255,100

[StyleItem]
X=0R
W=100
FontColor=255, 255, 255,255
FontFace=Arial
FontSize=12
StringEffect=Shadow
StringStyle=Bold
StringAlign=Left
AntiAlias=1
ClipString=1
Text="[\9654] %1"

[Variables]
Update=25
OriginalX=1920
TotalMove=500
Y1=0

[MeasureRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL="https://news.google.com/rss"
RegExp="(?siU).*<item.*>.*<title>(.*)</title>.*<title>(.*)</title>.*<title>(.*)</title>.*<title>(.*)</title>.*<title>(.*)</title>.*"
UpdateRate=20000
StringIndex=1
Debug=0

[MeasureMove]
Measure=Calc
Formula=Counter%#TotalMove#
AverageSize=1

[NewPosition]
Measure=Calc
Formula=#OriginalX#-MeasureMove

[MeasureRSSItem1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureRSS]
StringIndex=1

[MeasureRSSItem2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureRSS]
StringIndex=2

[MeasureRSSItem3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureRSS]
StringIndex=3

[MeasureRSSItem4]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureRSS]
StringIndex=4

[MeasureRSSItem5]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureRSS]
StringIndex=5

[MeterRSSItem1]
Meter=String
MeasureName=MeasureRSSItem1
MeterStyle=StyleItem
X=[NewPosition]
DynamicVariables=1

[MeterRSSItem2]
Meter=String
MeasureName=MeasureRSSItem2
MeterStyle=StyleItem

[MeterRSSItem3]
Meter=String
MeasureName=MeasureRSSItem3
MeterStyle=StyleItem

[MeterRSSItem4]
Meter=String
MeasureName=MeasureRSSItem4
MeterStyle=StyleItem

[MeterRSSItem5]
Meter=String
MeasureName=MeasureRSSItem5
MeterStyle=StyleItem

[MeterRSSItem12]
Meter=String
MeasureName=MeasureRSSItem1
X=([MeterRSSItem1:X]-#TotalMove#)
MeterStyle=StyleItem
DynamicVariables=1

[MeterRSSItem22]
Meter=String
MeasureName=MeasureRSSItem2
MeterStyle=StyleItem

[MeterRSSItem32]
Meter=String
MeasureName=MeasureRSSItem3
MeterStyle=StyleItem

[MeterRSSItem42]
Meter=String
MeasureName=MeasureRSSItem4
MeterStyle=StyleItem

[MeterRSSItem52]
Meter=String
MeasureName=MeasureRSSItem5
MeterStyle=StyleItem
That being said, I've identified the source of crashes I experienced (that also delayed me from posting a reliable solution to the OP's request): one MUST put all the sliding meters in a Container meter, otherwise the code IS NOT SAFE, causing nasty OS / Rainmeter crashes on slower computers like mine (and probably other "less visible" issues on faster computers like yours). I suggest updating your code accordingly.

P.S. I will do some more tests using the faulty "no container" code in order to be sure about the matter, and I'll post a bug report on the forum accordingly. As far as I can tell, it's a memory leak. Look at the commited memory value in the Memory section of the Performance tab from Task Manager, for me it's always increasing if using either the original code or yours, and it stays the same if the sliding meters are added to a container, like in my code below (please confirm if it happens for you as well, so I can post it in the bug section):
Rainmeter - Memory Leak.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by Yincognito on July 10th, 2020, 10:10 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth