It is currently May 26th, 2020, 8:37 pm

Cycling between sections after set interval in RSS reader skin

Help with creating, editing & fixing problems with skins
User avatar
chompskyhomp
Posts: 6
Joined: May 19th, 2020, 2:57 am

Cycling between sections after set interval in RSS reader skin

Post by chompskyhomp »

Okay, so I've been able to Frankenstein / edit most skins into doing what I want them to do, but this is apparently out of my scope of capabilities because I have no idea how to accomplish this. In the image below is my RSS reader skin. Each icon on top is a separate section of news stories from RSS feeds. I want to make it so that it changes to the next section after a set interval... say every 5 minutes.

Image

Code: Select all

[Metadata]
Skin name=RSS Reader
Version number=1.0
Information=RSS Feed Reader
Author=HiTBiT-PA (Original)  ChompskyHomp (Custom Edit)
License=Creative Commons Attribution-Noncommercial-Share Alike 3.0 License

[Rainmeter]
Update=900


[Variables]
@include=#@#Variables_Reader.inc
NewItemMinutes=10
CurrentFeed=1
FeedTitle=Loading...
Item1Title=
Item2Title=
Item3Title=
Item4Title=
Item5Title=
Item6Title=
Item7Title=
Item8Title=
Item9Title=
Item10Title=
Item11Title=
Item12Title=
Item13Title=
Item14Title=
Item15Title=
Item16Title=
Item17Title=
Item18Title=
Item19Title=
Item20Title=

bulletpt=""

;colours for headlines backgrounds
clickcolor=220,220,220,220
hovercolor=128,0,64,255
;transparent text background in normal state
normalcolor=0,0,0,1 

[StyleText]
FontFace=Segoe UI
FontColor=255,255,255
FontSize=10
StringAlign=Left
AntiAlias=1
ClipString=1
DynamicVariables=1
MouseLeaveAction=[!SetOption #CURRENTSECTION# solidcolor #normalcolor#][!Updatemeter #CURRENTSECTION# ][!Redraw]
MouseOverAction=[!SetOption #CURRENTSECTION# solidcolor #hovercolor#][!Updatemeter #CURRENTSECTION# ][!Redraw]
W=278
H=20


; =======================================================
;  					         MEASURES
; =======================================================

[MeasureFeed]
Measure=Plugin
Plugin=WebParser
UpdateRate=#UpdateRate#
URL=#URLNews1#
RegExp=(?siU)(.*)$
DecodeCharacterReference=1
Substitute=#Substitute#
FinishAction=!CommandMeasure MeasureReader Refresh(1)

[MeasureFeed2]
Measure=Plugin
Plugin=WebParser
UpdateRate=#UpdateRate#
Url=#URLNews2#
RegExp=(?siU)(.*)$
DecodeCharacterReference=1
Substitute=#Substitute#
FinishAction=!CommandMeasure MeasureReader Refresh(2)

[MeasureFeed3]
Measure=Plugin
Plugin=WebParser
UpdateRate=#UpdateRate#
Url=#URLNews3#
RegExp=(?siU)(.*)$
DecodeCharacterReference=1
Substitute=#Substitute#
FinishAction=!CommandMeasure MeasureReader Refresh(3)

[MeasureFeed4]
Measure=Plugin
Plugin=WebParser
UpdateRate=#UpdateRate#
Url=#URLNews4#
RegExp=(?siU)(.*)$
DecodeCharacterReference=1
Substitute=#Substitute#
FinishAction=!CommandMeasure MeasureReader Refresh(4)

[MeasureFeed5]
Measure=Plugin
Plugin=WebParser
UpdateRate=#UpdateRate#
Url=#URLNews5#
RegExp=(?siU)(.*)$
DecodeCharacterReference=1
Substitute=#Substitute#
FinishAction=!CommandMeasure MeasureReader Refresh(5)

[MeasureFeed6]
Measure=Plugin
Plugin=WebParser
UpdateRate=#UpdateRate#
Url=#URLNews6#
RegExp=(?siU)(.*)$
DecodeCharacterReference=1
Substitute=#Substitute#
FinishAction=!CommandMeasure MeasureReader Refresh(6)


[MeasureReader]
Measure=Script
ScriptFile=#@#Reader.lua
MeasureName=MeasureFeed|MeasureFeed2|MeasureFeed3|MeasureFeed4|MeasureFeed5|MeasureFeed6|MeasureFeed7
WriteHistory=0
KeepOldItems=0
FinishAction=[!UpdateMeterGroup Feeds][!Redraw]

; =======================================================
;  						   METERS
; =======================================================
[Background]
 Meter=Shape
 Shape=Rectangle 0,0,290,460 | FillColor 101010 | StrokeWidth 0
 Shape2=Rectangle 0,0,290,50 | FillColor 800040 | StrokeWidth 0


[Item1]
Meter=String
MeterStyle=StyleText
Text=#Item1Title#
LeftMouseUpAction=["#Item1Link#"]
x=5
y=55

[Item2]
Meter=String
MeterStyle=StyleText
Text=#Item2Title#
LeftMouseUpAction=["#Item2Link#"]
x=5
y=20r

[Item3]
Meter=String
MeterStyle=StyleText
Text=#Item3Title#
LeftMouseUpAction=["#Item3Link#"]
x=5
y=20r

[Item4]
Meter=String
MeterStyle=StyleText
Text=#Item4Title#
LeftMouseUpAction=["#Item4Link#"]
x=5
y=20r

[Item5]
Meter=String
MeterStyle=StyleText
Text=#Item5Title#
LeftMouseUpAction=["#Item5Link#"]
x=5
y=20r

[Item6]
Meter=String
MeterStyle=StyleText
Text=#Item6Title#
LeftMouseUpAction=["#Item6Link#"]
x=5
y=20r

[Item7]
Meter=String
MeterStyle=StyleText
Text=#Item7Title#
LeftMouseUpAction=["#Item7Link#"]
x=5
y=20r

[Item8]
Meter=String
MeterStyle=StyleText
Text=#Item8Title#
LeftMouseUpAction=["#Item8Link#"]
x=5
y=20r

[Item9]
Meter=String
MeterStyle=StyleText
Text=#Item9Title#
LeftMouseUpAction=["#Item9Link#"]
x=5
y=20r


[Item10]
Meter=String
MeterStyle=StyleText
Text=#Item10Title#
LeftMouseUpAction=["#Item10Link#"]
x=5
y=20r

[Item11]
Meter=String
MeterStyle=StyleText
Text=#Item11Title#
LeftMouseUpAction=["#Item11Link#"]
x=5
y=20r

[Item12]
Meter=String
MeterStyle=StyleText
Text=#Item12Title#
LeftMouseUpAction=["#Item12Link#"]
x=5
y=20r

[Item13]
Meter=String
MeterStyle=StyleText
Text=#Item13Title#
LeftMouseUpAction=["#Item13Link#"]
x=5
y=20r

[Item14]
Meter=String
MeterStyle=StyleText
Text=#Item14Title#
LeftMouseUpAction=["#Item14Link#"]
x=5
y=20r

[Item15]
Meter=String
MeterStyle=StyleText
Text=#Item15Title#
LeftMouseUpAction=["#Item15Link#"]
x=5
y=20r

[Item16]
Meter=String
MeterStyle=StyleText
Text=#Item16Title#
LeftMouseUpAction=["#Item16Link#"]
x=5
y=20r

[Item17]
Meter=String
MeterStyle=StyleText
Text=#Item17Title#
LeftMouseUpAction=["#Item17Link#"]
x=5
y=20r

[Item18]
Meter=String
MeterStyle=StyleText
Text=#Item18Title#
LeftMouseUpAction=["#Item18Link#"]
x=5
y=20r

[Item19]
Meter=String
MeterStyle=StyleText
Text=#Item19Title#
LeftMouseUpAction=["#Item19Link#"]
x=5
y=20r

[Item20]
Meter=String
MeterStyle=StyleText
Text=#Item20Title#
LeftMouseUpAction=["#Item20Link#"]
x=5
y=20r

[NewsButton1]
Meter=Image
X=13
Y=5
W=40
H=40
ImageName=#@#Images\Reader\Icons\news1.png
LeftMouseUpAction=!CommandMeasure "MeasureReader" "Show(1)"
ToolTipText=Deals

[NewsButton2]
Meter=Image
X=44r
Y=r
W=40
H=40
ImageName=#@#Images\Reader\Icons\news2.png
LeftMouseUpAction=!CommandMeasure "MeasureReader" "Show(2)"
ToolTipText=Games

[NewsButton3]
Meter=Image
X=44r
Y=r
W=40
H=40
ImageName=#@#Images\Reader\Icons\news3.png
LeftMouseUpAction=!CommandMeasure "MeasureReader" "Show(3)"
ToolTipText=Music

[NewsButton4]
Meter=Image
X=44r
Y=r
W=40
H=40
ImageName=#@#Images\Reader\Icons\news4.png
LeftMouseUpAction=!CommandMeasure "MeasureReader" "Show(4)"
ToolTipText=Tech

[NewsButton5]
Meter=Image
X=44r
Y=r
W=40
H=40
ImageName=#@#Images\Reader\Icons\news5.png
LeftMouseUpAction=!CommandMeasure "MeasureReader" "Show(5)"
ToolTipText=News

[NewsButton6]
Meter=Image
X=44r
Y=r
W=40
H=40
ImageName=#@#Images\Reader\Icons\news6.png
LeftMouseUpAction=!CommandMeasure "MeasureReader" "Show(6)"
ToolTipText=Movies



Thanks for any help / tips in advance
User avatar
balala
Rainmeter Sage
Posts: 10605
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Cycling between sections after set interval in RSS reader skin

Post by balala »

chompskyhomp wrote:
May 19th, 2020, 3:51 am
Okay, so I've been able to Frankenstein / edit most skins into doing what I want them to do, but this is apparently out of my scope of capabilities because I have no idea how to accomplish this. In the image below is my RSS reader skin. Each icon on top is a separate section of news stories from RSS feeds. I want to make it so that it changes to the next section after a set interval... say every 5 minutes.
The posted code is completely useless, because there is an included file (@Resources\Variables_Reader.inc), which we don't have. That file contains probably some absolutely needed variables, like URLNews1, URLNews2 and so on.
The used images would also be great.
So, when there are a lot of included files, like this time, would be much better to pack the whole config and upload the package. That package would contain all included files (images, the .inc file and so on), so we should work with it.
So, please post the package.
User avatar
chompskyhomp
Posts: 6
Joined: May 19th, 2020, 2:57 am

Re: Cycling between sections after set interval in RSS reader skin

Post by chompskyhomp »

I didn't post the variables_reader file because it's useless in this situation with what I'm trying to do. The only variables included in that file are the URL links.

Code: Select all

[Variables]
; =======================================================
;  			              RSS WEBSITE ADDRESS
; =======================================================
;URL1 = Deals
;URL2 = Games
;URL3 = Music
;URL4 = Tech
;URL5 = News
;URL6 = Movie releases

URLNews1=http://www.rssmix.com/u/11622224/rss.xml
URLNews2=http://www.rssmix.com/u/11622227/rss.xml
URLNews3=http://feeds.feedburner.com/realmofmetal
URLNews4=http://www.rssmix.com/u/11622232/rss.xml
URLNews5=http://www.rssmix.com/u/11622233/rss.xml
URLNews6=http://www.rssmix.com/u/8303411/rss.xml


; The icons are in Images\Reader\Icons folder
; To change them you just have to replace with the same name

; =======================================================
;        3600=60 minuts		      RSS UPDATE EVERY...
; =======================================================

; For news feed...

UpdateRate=900

Here's a link to the package:
https://drive.google.com/open?id=1WIA2nadHtNsGpTAKwMsIVAwf4VYjaKT5
User avatar
balala
Rainmeter Sage
Posts: 10605
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Cycling between sections after set interval in RSS reader skin

Post by balala »

chompskyhomp wrote:
May 19th, 2020, 5:13 pm
I didn't post the variables_reader file because it's useless in this situation with what I'm trying to do. The only variables included in that file are the URL links.
No, it's not. Having a functional skin, instead of a not working code, is much more useful. Extremely useful. Note that the code, besides the @Resources\Variables_Reader.inc included file and the needed images, has a few other still missing things: for instance we don't have neither the Substitute variable, nor the Reader.lua script file and so on. As said, when you have a code which uses more included files of any type (images, included variables, .lua script files or whatever) is always a good approach to upload the package, to help us to can help you. Otherwise we can't help, no one will recreate everything needed in the code, especially that in many cases we can't even (like this time).
chompskyhomp wrote:
May 19th, 2020, 5:13 pm
Here's a link to the package:
https://drive.google.com/open?id=1WIA2nadHtNsGpTAKwMsIVAwf4VYjaKT5
The package can't be downloaded, Google Drives says it is infected and doesn't let me to download it. Please check.
User avatar
chompskyhomp
Posts: 6
Joined: May 19th, 2020, 2:57 am

Re: Cycling between sections after set interval in RSS reader skin

Post by chompskyhomp »

Just downloaded the file on a different computer on a different account. No problems. Not sure what your problem is, but yeah... there's nothing wrong with the upload.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3933
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Cycling between sections after set interval in RSS reader skin

Post by eclectic-tech »

chompskyhomp wrote:
May 19th, 2020, 8:44 pm
Just downloaded the file on a different computer on a different account. No problems. Not sure what your problem is, but yeah... there's nothing wrong with the upload.
Google will let the owner download infected files, but no one else... you need to clean your PC and eliminate the virus(es).
googleVirus.png
You do not have the required permissions to view the files attached to this post.
User avatar
chompskyhomp
Posts: 6
Joined: May 19th, 2020, 2:57 am

Re: Cycling between sections after set interval in RSS reader skin

Post by chompskyhomp »

So after some research I found that apparently for some reason Google Drive marks some archives as infected if there are .exe files contained within it. I was perplexed at first, because 1) I had my automatic virus scans run last night and nothing was detected and 2) Ran another scan and again, nothing detected. There were old .exe's in the original skin archive like RainRGB4 and RainFile, which aren't used by anything in my edited version of this skin anymore, so I just removed them from the folder and re-uploaded a fresh archive. I just downloaded it from a different IP address entirely, so it should be fixed now.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3933
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Cycling between sections after set interval in RSS reader skin

Post by eclectic-tech »

chompskyhomp wrote:
May 20th, 2020, 12:53 am
So after some research I found that apparently for some reason Google Drive marks some archives as infected if there are .exe files contained within it. I was perplexed at first, because 1) I had my automatic virus scans run last night and nothing was detected and 2) Ran another scan and again, nothing detected. There were old .exe's in the original skin archive like RainRGB4 and RainFile, which aren't used by anything in my edited version of this skin anymore, so I just removed them from the folder and re-uploaded a fresh archive. I just downloaded it from a different IP address entirely, so it should be fixed now.
Yeah, those excutable files can sometimes get flagged as potential viruses!

Can you post an updated link to your skin package, the one above is no longer valid?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3933
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Cycling between sections after set interval in RSS reader skin

Post by eclectic-tech »

To change the feed at set time intervals, you could use a Time measure and a Calc measure with IfConditions.

For example, create a new variable called 'NewFeedSeconds' and set it's value to 300 (5 minutes).
Then add 2 measures, a time measure and a calc measure. The calc measure uses modulo math to reset the formula value to zero based on the number of seconds in the Time measure defined by 'NewFeedSeconds'. The If Condition will test if the value is zero and if true, will increase the currentfeed value in a loop from 1 to 6 and command the reader script to show the next feed.

Code: Select all

[Variables]
NewFeedSeconds=300

[MeasureTime]
Measure=Time

[MeasureFeedChange]
Measure=Calc
Formula=MeasureTime%#NewFeedSeconds#
IfCondition=MeasureFeedChange=0
IfTrueAction=[!SetVariable CurrentFeed ((#CurrentFeed#%6)+1)][!CommandMeasure "MeasureReader" "Show(#CurrentFeed#)"]
DynamicVariables=1
Hope this helps get you close to what you want.
User avatar
balala
Rainmeter Sage
Posts: 10605
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Cycling between sections after set interval in RSS reader skin

Post by balala »

chompskyhomp wrote:
May 20th, 2020, 12:53 am
so I just removed them from the folder and re-uploaded a fresh archive. I just downloaded it from a different IP address entirely, so it should be fixed now.
Where? Because as eclectic-tech said:
eclectic-tech wrote:
May 20th, 2020, 2:11 am
the one above is no longer valid?
A link please?