It is currently April 13th, 2021, 11:06 am

help with inline options

Help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 21617
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: help with inline options

Post by jsmorley »

Again, I'd be tempted to at least try separating that into different relatively positioned meters, and only apply the inline settings where they are needed. My gut feeling is that that is a huge string, that since it has dynamic variables on it, has to be re-recreated from scratch and all those inline settings applied on every update, every 100ms. I can't promise that separating them will help, but I think that might be worth a look.
User avatar
Youkai1977
Posts: 138
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: help with inline options

Post by Youkai1977 »

May I connect to this (yet something older thread) with my problem?

I have, as far as I understand the problem of the thread opener correctly, namely a very similar problem.
I just don't understand this sytnax (if you call it that?) of the whole [ ( .* $ and so on). It's just too high level for me. There one could also try to explain to me Einstein's relativity theory on Latain backwards.
Also the whole references to the help pages, which are mentioned in the Rainmeter manual in addition do not bring me further. All Roman villages for me

Therefore ... I look and ask sweetly whether one can point out a simple solution to me fool here. :oops:

And it is about the following ...

Code: Select all

[NewsFeed]
Meter=STRING
MeterStyle=StNEWS
X=[mXPos]r
Y=0

[StNEWS]
Padding=0,4,-1,5
SolidColor=#Color0##Alpha0#
FontColor=#Color7##Alpha1#
FontFace=#FontFace#
FontSize=#FS1#
StringCase=UPPER
AntiAlias=1
Text=[\x2022][\x2022][\x2022]  [mRSSItem1]  [\x2022][\x2022][\x2022]  [mRSSItem2]  [\x2022][\x2022][\x2022]  [mRSSItem3]  [\x2022][\x2022][\x2022]  [mRSSItem4]  [\x2022][\x2022][\x2022]  [mRSSItem5]  [\x2022][\x2022][\x2022] 
InlineSetting=Color | #Color1##Alpha1#
InlinePattern=[\x2022] 
InlineSetting2=Color | #Color2##Alpha1#
InlinePattern2=[mRSSItem1]
DynamicVariables=1
UpdateDivider=1
Container=CONTAINER_NWF
I want all (AND ONLY THOSE) Points (Unicode [\x2022]) to be in Color "White".

Then [mRSSItem1] [mRSSItem3] [mRSSItem5] in Color "Light Blue"
And [mRSSItem2] as well as [mRSSItem4] in Color "Dark Blue"

So, since now always one over the other must be excluded or marked (or whatever you call it) at the InlinePadding with these whole [.*$^\])() - stuff starts at this point my problem, and my head to smoke. :???: O.O

I've spent hours now trying to get this to work, but it just won't. :thumbdown:
In addition, this "StringCase=Upper" is also hitting me. If I then have found an InlinePadding formatting, it doesn't work again, because of the StringCase.
I really break down here. :-( :-( :-( :uhuh:
User avatar
balala
Rainmeter Sage
Posts: 12546
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with inline options

Post by balala »

Youkai1977 wrote: March 12th, 2021, 5:06 pm I want all (AND ONLY THOSE) Points (Unicode [\x2022]) to be in Color "White".
They are white, at least if the Color1 is set to white (Color1=255,255,255, or something similar).
Youkai1977 wrote: March 12th, 2021, 5:06 pm Then [mRSSItem1] [mRSSItem3] [mRSSItem5] in Color "Light Blue"
And [mRSSItem2] as well as [mRSSItem4] in Color "Dark Blue"
You have to add one more InlineSetting / InlinePattern option pair, to get all these. Replace the existing InlineSetting2 / InlinePatter2 options with these:

Code: Select all

InlineSetting2=Color | #Color2##Alpha1#
InlinePattern2=[mRSSItem1] | [mRSSItem3] | [mRSSItem5]
InlineSetting3=Color | #Color3##Alpha1#
InlinePattern3=[mRSSItem2] | [mRSSItem4]
These options require to have properly defined the color variables (for example Color2=153,217,234 and Color3=0,0,255).
Youkai1977 wrote: March 12th, 2021, 5:06 pm In addition, this "StringCase=Upper" is also hitting me. If I then have found an InlinePadding formatting, it doesn't work again, because of the StringCase.
Try to add the (?i) parameter to the InlinePattern options, like this: InlinePattern2=(?i)[mRSSItem1] | [mRSSItem3] | [mRSSItem5] and InlinePattern3=(?i)[mRSSItem2] | [mRSSItem4].
With all this, the code of the [StNEWS] meter should look like this:

Code: Select all

[StNEWS]
Padding=0,4,-1,5
SolidColor=#Color0##Alpha0#
FontColor=#Color7##Alpha1#
FontFace=#FontFace#
FontSize=#FS1#
StringCase=UPPER
AntiAlias=1
Text=[\x2022][\x2022][\x2022]  [mRSSItem1]  [\x2022][\x2022][\x2022]  [mRSSItem2]  [\x2022][\x2022][\x2022]  [mRSSItem3]  [\x2022][\x2022][\x2022]  [mRSSItem4]  [\x2022][\x2022][\x2022]  [mRSSItem5]  [\x2022][\x2022][\x2022] 
InlineSetting=Color | #Color1##Alpha1#
InlinePattern=[\x2022] 
InlineSetting2=Color | #Color2##Alpha1#
InlinePattern2=(?i)[mRSSItem1] | [mRSSItem3] | [mRSSItem5]
InlineSetting3=Color | #Color3##Alpha1#
InlinePattern3=(?i)[mRSSItem2] | [mRSSItem4]
DynamicVariables=1
UpdaeDivider=1
Container=CONTAINER_NWF
User avatar
Youkai1977
Posts: 138
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: help with inline options

Post by Youkai1977 »

Old Swede, you are my hero ... that's exactly what I was looking for. Your solution worked (after adjusting the colors) right away. Many many thanks for that :great: :rosegift: :bow: :bow:
Just don't ask me now what the (?i) means or does :confused: :???: ... this whole command part at Rainmeter is still too high for me. I just care ... it works like this.

I had an almost similar solution, but without the | between each [mRSSItem].
So you can see how close I was to the right solution myself.


But now something else is annoying me in my RRS news feed meter.
If I set the name "GOOGLE NEWS" per variable in the corresponding meter then the width (W) of the string is read out and can be used accordingly.
But if I read the name "GOOGLE NEWS" directly from the MEASURE and then put it into the corresponding meter, then there is a wrong/no W-value.

Example 1:
Text=#RSSName# -> #RSSName# = variable with value "GOOGLE NEWS".

Example 2:
Text=[mRSS] -> [mRSS] = Measure with value "GOOGLE NEWS".

In example 2 it seems that somehow no ( or correct ) W-value is returned, so that the current width of the meter cannot be measured.
But I need this, so the W-value, because the width of my meter should adapt according to the text width.
However, I would like to use example 2 in the future. Only stupid if I do not get a W-value.

Here my Code:
1.) newsfeed.ini

Code: Select all

[Rainmeter]
Update=20
DefaultUpdateDivider=50
AccurateText=1
DynamicWindowSize=1

[Metadata]
Name=NewsFeed Reader (Marquee)
Author=Youkai1977 
Version=02-21.V1 <> 11.02.2021
Information=This Meter is a Part of M.A.R.S.- 2021 Skin Package
License=Creative Commons Attribution-Non-Commercial-Share Alike 4.0

;==================================================
;=== VARIABLES & STYLES ===========================
;==================================================

[Variables]
@include=newsfeeddata.inc

;==================================================
;=== MEASURES NEWS FEED & MARQUEE =================
;==================================================

;=== MEASURES NEWS FEED ===========================

[mRSS]
Measure=PLUGIN
Plugin=WebParser
URL=#RSSUrl#
RegExp="(?siU)<description.*>(.*)</description>.*<link.*>(.*)</link>.*<item.*<title.*>(.*)</title>.*<link.*>(.*)</link>(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)"
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
UpdateRate=1200
StringIndex=1
Debug=1
OnUpdateAction=[!SetOption HEADNAME FontColor "#Color4##Alpha1#"][!UpdateMeter HEADNAME][!Redraw]
FinishAction=[!SetOption HEADNAME FontColor "#Color3##Alpha1#"][!UpdateMeter HEADNAME][!Redraw]

[mRSSItem1]
Measure=PLUGIN
Plugin=WebParser
URL=[mRSS]
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
StringIndex=3

[mRSSItem2]
Measure=PLUGIN
Plugin=WebParser
URL=[mRSS]
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
StringIndex=5

[mRSSItem3]
Measure=PLUGIN
Plugin=WebParser
URL=[mRSS]
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
StringIndex=7

[mRSSItem4]
Measure=PLUGIN
Plugin=WebParser
URL=[mRSS]
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
StringIndex=9

[mRSSItem5]
Measure=PLUGIN
Plugin=WebParser
URL=[mRSS]
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
StringIndex=11

;=== MEASURES MARQUEE FUNCTION ====================

[mTimer]
Measure=CALC
Formula=(mTimer % (#StartPos#+#MaxMove#))#Direction#
UpdateDivider=1

[mXPos]
Measure=CALC
Formula=(mTimer+#StartPos#)
UpdateDivider=1

;##################################################
;##################################################
;##################################################
;##################################################
;##################################################
;##################################################

;==================================================
;=== HEAD NEWS FEED READER (Side Lines) ===========
;==================================================

[HEADLINES]
Meter=SHAPE
X=0
Y=0
Shape=Rectangle 0,0,8,8 | Extend ModifiersS1
Shape2=Line 8,4,26,4 | Extend ModifiersL1
Shape3=Rectangle 26,0,8,8 | Extend ModifiersS1
;-----
Shape4=Rectangle 0,16,8,8 | Extend ModifiersS2
Shape5=Line 8,20,26,20 | Extend ModifiersL2
Shape6=Rectangle 26,16,8,8 | Extend ModifiersS2
;-----
Shape7=Rectangle ([HEADNAME:W] + 48),0,8,8 | Extend ModifiersS1
Shape8=Rectangle ([HEADNAME:W] + 48),0,8,8 | Extend ModifiersS1
Shape9=Rectangle ([HEADNAME:W] + 48),16,8,8 | Extend ModifiersS2
Shape10=Rectangle ([HEADNAME:W] + 48),16,8,8 | Extend ModifiersS2
;-----
Shape11=Rectangle 872,0,8,8 | Extend ModifiersS1
Shape12=Line 854,4,872,4 | Extend ModifiersL1
Shape13=Rectangle 846,0,8,8 | Extend ModifiersS1
;-----
Shape14=Rectangle 872,16,8,8 | Extend ModifiersS2
Shape15=Line 854,20,872,20 | Extend ModifiersL2
Shape16=Rectangle 846,16,8,8 | Extend ModifiersS2
ModifiersS1=StrokeWidth 0 | Fill Color #Color3##Alpha2#
ModifiersL1=StrokeWidth 2 | StrokeColor #Color3##Alpha2#
ModifiersS2=StrokeWidth 0 | Fill Color #Color3##Alpha1#
ModifiersL2=StrokeWidth 2 | StrokeColor #Color3##Alpha1#
DynamicVariables=1
UpdateDivider=-1

[HEADNAME]
Meter=STRING
MeterStyle=StHEAD
X=41
Y=0
LeftMouseUpAction=[#vURL##]

;==================================================
;=== MARQUEE NEWS FEED READER =====================
;==================================================

;=== CONTAINER NEWS FEED ==========================

; [CONTAINER_TEST]
; Meter=SHAPE
; X=0
; Y=0
; Shape=Line ([HEADNAME:W] + 60),0,839,0 | StrokeWidth 46 | StrokeColor #Color0##Alpha0#
; DynamicVariables=1
; UpdateDivider=-1

[CONTAINER_NWF]
Meter=SHAPE
X=0
Y=0
Shape=Line ([HEADNAME:W] + 63),0,839,0 | StrokeWidth 47 | StrokeColor #Color0##Alpha1#
DynamicVariables=1
UpdateDivider=-1
LeftMouseDoubleClickAction=[#vURL#]

;=== MARQUEE NEWS FEED ============================

[NewsFeed]
Meter=STRING
MeterStyle=StNEWS
X=[mXPos]r
Y=0
2.) newsfeeddata.inc

Code: Select all

[Variables]
;********************************************************************************************************************************************************
;********************************************************************************************************************************************************
;***                                                                                                                                               ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;***                                                                                                                                               ******
;********************************************************************************************************************************************************
;********************************************************************************************************************************************************
;==================================================
;=== VARIABLES FONTFACE - SIZE - COLORS ===========
;==================================================
FontFace=SQUARE721 BT
FS1=10
FS2=8
Alpha0=1
Alpha1=255
Alpha2=70
Alpha3=230
Color0=0,0,0,
Color1=160,246,253,
Color2=48,180,200,
Color3=97,240,255,
Color4=253,193,0,
Color5=164,0,0,
Color6=64,64,64,
Color7=255,255,255
;==================================================
;=== VARIABLES NEWS FEED READER ===================
;==================================================
Direction=-1
MaxMove=3500
StartPos=850
RSSName=GOOGLE NEWS
RSSUrl=https://news.google.com/rss?pz=1&cf=all&hl=de&gl=DE&ceid=DE:de
vURL=http://news.google.de/
;==================================================
;=== STYLE NEWS FEED HEAD (Side Line) =============
;==================================================

[StHEAD]
Padding=0,4,-1,5
SolidColor=#Color0##Alpha0#
FontColor=#Color3##Alpha1#
FontFace=#FontFace#
FontSize=#FS1#
StringCase=UPPER
AntiAlias=1
Text=[mRSS]
ClipString=2
ClipStringW=105
ClipStringH=15
DynamicVariables=1
UpdateDivider=-1

;==================================================
;=== STLYE NEWS FEED ==============================
;==================================================

[StNEWS]
Padding=0,4,-1,5
SolidColor=#Color0##Alpha0#
; FontColor=#Color7##Alpha1#
FontFace=#FontFace#
FontSize=#FS1#
StringCase=UPPER
AntiAlias=1
Text=[\x2022][\x2022][\x2022]  [mRSSItem1]  [\x2022][\x2022][\x2022]  [mRSSItem2]  [\x2022][\x2022][\x2022]  [mRSSItem3]  [\x2022][\x2022][\x2022]  [mRSSItem4]  [\x2022][\x2022][\x2022]  [mRSSItem5]  [\x2022][\x2022][\x2022] 
InlineSetting=Color | #Color7##Alpha1#
InlinePattern=[\x2022] 
InlineSetting2=Color | #Color1##Alpha1#
InlinePattern2=(?i)[mRSSItem1] | [mRSSItem3] | [mRSSItem5]
InlineSetting3=Color | #Color2##Alpha1#
InlinePattern3=(?i)[mRSSItem2] | [mRSSItem4]
DynamicVariables=1
UpdateDivider=1
Container=CONTAINER_NWF
This is the VALUE [HEADNAME:W] from the meter of the same name.
Mentioned value is needed, so that the SHAPE meters (which need this value, in each case shift so in the X-position, so that they leave the string "GOOGLE NEWS" accordingly place.

What am I missing here? What is the difference between passing the value "GOOGLE NEWS" by Variable #RSSName#, or by measure [mRSS]?

Oh yes, then one more thing. This FinishAction in the Measure [mRSS] which should make the text "GOOGLE NEWS" briefly yellow in the update mode of the same, appears permanently yellow with me. This is not supposed to be like this. As I said, only when the Measure [mRSS] is currently updating. After that the text "GOOGLE NEWS" should be blue again.

I know, say nothing ... the Youkai and its problems ... :oops: :Whistle

P.S. My other site (SlideShow ... other thread) there I answer tomorrow or the days. Is what more extensive, but is late now (2:30 at night) ... I'm going to sleep now.
User avatar
balala
Rainmeter Sage
Posts: 12546
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with inline options

Post by balala »

Youkai1977 wrote: March 13th, 2021, 1:44 am Just don't ask me now what the (?i) means or does :confused: :???: ... this whole command part at Rainmeter is still too high for me. I just care ... it works like this.
It makes the string to be case insensitive. It had to be added due to your StringCase=UPPER option, added to the [StNEWS] meter, because if the [mRSSItem1] - [mRSSItem5] measures are not returning only uppercase letters (and probably they don't), if for instance [mRSSItem1] returns abc (lowercase), the InlinePattern2=[mRSSItem1] won't match (and accordingly the string won't be colored to the appropriate color), because the meter shows ABC, due to the mentioned StringCase=UPPER option. By adding the (?i) parameter (or whatever is it called), the case doesn't matter anymore. In such a case doesn't matter how the [mRSSItem1] measure are returng the string, if that string is abc, it matchs and will be colored.
Youkai1977 wrote: March 13th, 2021, 1:44 am But now something else is annoying me in my RRS news feed meter.
If I set the name "GOOGLE NEWS" per variable in the corresponding meter then the width (W) of the string is read out and can be used accordingly.
But if I read the name "GOOGLE NEWS" directly from the MEASURE and then put it into the corresponding meter, then there is a wrong/no W-value.

Example 1:
Text=#RSSName# -> #RSSName# = variable with value "GOOGLE NEWS".

Example 2:
Text=[mRSS] -> [mRSS] = Measure with value "GOOGLE NEWS".

In example 2 it seems that somehow no ( or correct ) W-value is returned, so that the current width of the meter cannot be measured.
But I need this, so the W-value, because the width of my meter should adapt according to the text width.
However, I would like to use example 2 in the future. Only stupid if I do not get a W-value.

Here my Code:
1.) newsfeed.ini

This is the VALUE [HEADNAME:W] from the meter of the same name.
Mentioned value is needed, so that the SHAPE meters (which need this value, in each case shift so in the X-position, so that they leave the string "GOOGLE NEWS" accordingly place.

What am I missing here? What is the difference between passing the value "GOOGLE NEWS" by Variable #RSSName#, or by measure [mRSS]?
Try removing the UpdateDivider=-1 option from the [StHEAD] section of the newsfeeddata.inc file. If GOOGLE NEWS is returned by a WebParser measure and the above option is used, the meter doesn't update after the measure gets the value, so its width remains unchanged.

Aditional two notes:
  • The Update of skin is set to 20 and the UpdateRate option of the parent WebParser measure to 1200. Accordingly you get an update of the WebParser measure every 24 seconds. Too less. I understand the reason of the low Update (the animation), but accordingly I'd increase the UpdatRate to (probably) UpdateRate=60000, because if the skin is updated once per 0.02 seconds (accordingly to the set Update=20), the WebParser measure will be updated on each 0.02 x 60,000 = 1200 seconds, which I suppose is what you meant by the UpdateRate=1200, set on the [mRSS] measure.
  • WebParser is not a plugin anymore. Yep, it indeed was a plugin a while ago, but in meantime it has been converted to an internal measure. Due to the backward compatibility the Measure=PLUGIN and Plugin=WebParser option pair still works, but accordingly to the new syntax, you should set the measures to Measure=WebParser. So, recommend to replace the option pairs with Measure=WebParser.
Youkai1977 wrote: March 13th, 2021, 1:44 am I know, say nothing ... the Youkai and its problems ... :oops: :Whistle
No, at all. If I'd say this, I'd not reply. Your questions keep me "in form", so don't worry, just ask whenever question arise.
User avatar
Youkai1977
Posts: 138
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: help with inline options

Post by Youkai1977 »

balala wrote: March 13th, 2021, 8:23 pm It makes the string to be case insensitive. It had to be added due to your StringCase=UPPER option, added to the [StNEWS] meter, because if the [mRSSItem1] - [mRSSItem5] measures are not returning only uppercase letters (and probably they don't), if for instance [mRSSItem1] returns abc (lowercase), the InlinePattern2=[mRSSItem1] won't match (and accordingly the string won't be colored to the appropriate color), because the meter shows ABC, due to the mentioned StringCase=UPPER option. By adding the (?i) parameter (or whatever is it called), the case doesn't matter anymore. In such a case doesn't matter how the [mRSSItem1] measure are returng the string, if that string is abc, it matchs and will be colored.
Ah ok, interesting. I thought that if I specify [mRSSItem1] it will take the value/string returned from it and just color it.
Again what learned ... let's see if I still know this in a year or so when I tinker with Rainmeter again. :oops:
Try removing the UpdateDivider=-1 option from the [StHEAD] section of the newsfeeddata.inc file. If GOOGLE NEWS is returned by a WebParser measure and the above option is used, the meter doesn't update after the measure gets the value, so its width remains unchanged.
Unfortunately no change ... the W-value remains at "-1" according to the Rainmeter protocol and thus the Shapes do not sit in the correct place.
The W-value should actually be W=102 with font size 10 and my selected font. And it does only if I pass GOOGLE NEWS per #RSSName# - variable to the Meter [NewsFeed] per [StNEWS]. If I change this to Text=[mRSS] instead of Text=#RSSName# the W-value is immediately again on -1.
There your tip with the UpdateDivider=-1 remove also not helps ... unfortunately.
Would have been nice if it would be so simple.
Aditional two notes:
  • The Update of skin is set to 20 and the UpdateRate option of the parent WebParser measure to 1200. Accordingly you get an update of the WebParser measure every 24 seconds. Too less. I understand the reason of the low Update (the animation), but accordingly I'd increase the UpdatRate to (probably) UpdateRate=60000, because if the skin is updated once per 0.02 seconds (accordingly to the set Update=20), the WebParser measure will be updated on each 0.02 x 60,000 = 1200 seconds, which I suppose is what you meant by the UpdateRate=1200, set on the [mRSS] measure.
  • WebParser is not a plugin anymore. Yep, it indeed was a plugin a while ago, but in meantime it has been converted to an internal measure. Due to the backward compatibility the Measure=PLUGIN and Plugin=WebParser option pair still works, but accordingly to the new syntax, you should set the measures to Measure=WebParser. So, recommend to replace the option pairs with Measure=WebParser.
Very interesting about the Webparser. I did not know that at all. I have directly implemented ... and tadaaa ...works. :D

Then to my UpdateDivider=20.
Correct, I need it so that the NewsFeed runs smoothly. But I have set a DefaultUpdateDivider=50.
So all measures and meters that do NOT have an UpdateDivider=1 should have an Update=1000 because of the DefaultUpdateDivider=50.
At least if I have understood the corresponding forum posts and the online manual on the subject correctly.
No, at all. If I'd say this, I'd not reply. Your questions keep me "in form", so don't worry, just ask whenever question arise.
Then I am reassured. I have slowly already afraid, with all the problems and questions on my part the last few weeks, the thought comes up here so after the motto "Dude we write you your skins or you?". :phhht :oops:

Had you seen my question/problem regarding my FinishAction issue? I have not been able to solve that myself yet. I think there will be a simple solution, which I either don't see myself, or I misunderstand the FinishAction issue. :???:
User avatar
balala
Rainmeter Sage
Posts: 12546
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with inline options

Post by balala »

Youkai1977 wrote: March 13th, 2021, 9:22 pm Unfortunately no change ... the W-value remains at "-1" according to the Rainmeter protocol and thus the Shapes do not sit in the correct place.
The W-value should actually be W=102 with font size 10 and my selected font. And it does only if I pass GOOGLE NEWS per #RSSName# - variable to the Meter [NewsFeed] per [StNEWS]. If I change this to Text=[mRSS] instead of Text=#RSSName# the W-value is immediately again on -1.
There your tip with the UpdateDivider=-1 remove also not helps ... unfortunately.
Would have been nice if it would be so simple.
I'm surprised, because it does work for me. I tried adding a simple String meter to the end of the code, which shows the Text=[HEADNAME:W] variable, and in the very first moment it is -1, then, aftre the WebParser measure gets the value, it is switching immediately to 91.
If you're using the Text=[mRSS] option, make sure you have added a DynamicVariables=1 option, because it is required.
Youkai1977 wrote: March 13th, 2021, 9:22 pm Very interesting about the Webparser. I did not know that at all. I have directly implemented ... and tadaaa ...works. :D
I agree, it does work, however if you're updating a WebParser measure once per 24 seconds, after a while you could be banned.
Youkai1977 wrote: March 13th, 2021, 9:22 pm Then I am reassured. I have slowly already afraid, with all the problems and questions on my part the last few weeks, the thought comes up here so after the motto "Dude we write you your skins or you?". :phhht :oops:
Don't worry, unless you're asking someone to write a code for you, there is no problem. Replying user's questions is the main purpose of this forum, I think.
Youkai1977 wrote: March 13th, 2021, 9:22 pm Had you seen my question/problem regarding my FinishAction issue? I have not been able to solve that myself yet. I think there will be a simple solution, which I either don't see myself, or I misunderstand the FinishAction issue. :???:
No, I missed it somehow and see it just now. Sorry, but here is almost midnight (I'm one hour ahead you), so now I'm going to sleep. But I promise tomorrow will take a look, if in meantime someone else doesn't fix the issue.
User avatar
Youkai1977
Posts: 138
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: help with inline options

Post by Youkai1977 »

I found the bug. The Shape-Meter also needs to be updated or needs the UpdateDivider=1
Then it works.
However, as you wrote, slightly delayed, which is kind of crap.
That's why I have now solved this by setting all Meters that are dependent on [HEADNAME: W], including the actual HEADNAME-Meter, as a group FEED, and that the HEADNAME-Meter is set to Hidden=1.
These are then updated by Measure [mRSS], then the HEADNAME-Meter is set back to visible Hidden=0.
The Word GOOGLE NEWS can only be seen when the Shapes are in their position.
Works quite well, and above all I can leave the UpdateDivider of the meters and shape meters involved at -1.
DISADVANTAGE of this method, you don't see if the word GOOGLE NEWS changes color when the measure [mRSS] is updated. But the color change part doesn't really work anyway ... see my FinishAction problem.

However, even if I'm an hour behind you on the time zone side. It's late enough for me now and I'm going to bed right now ... no more desire today ...

Then I just noticed that your solution to my inline setting problem sometimes fails. Then the feed is not colored in the desired color, but in white like the dots [\x2022]. Why is it, no plan. The problem is sporadic. In any case, the last feed, the [mRSSItem5] is always affected.

As for the update rate for the [mRSS] measure, I have now set it to your suggested 60,000. But since my color change - fuss does not work, I can not understand when it is really updated.
I'm a bit confused again with this whole update, UpdateRate, Divider, DefaultUpdateRate and so on.

As for my guilty conscience about asking questions all the time, ok. And I'm not expecting that people write whole skins to me either. Then the point would be gone somewhere, because in the end I would like to have the feeling that "I" did it.
But based on your comment that somehow helping each other is the reason for the existence of this forum or the community, my guilty conscience remains somewhere. Conversely, I haven't really been of any help to anyone ... partly because of my own ignorance about Rainmeter.

Well, finally (for today ... * uh * yesterday ... look at the clock :o O.O ) here again in the appendix the current coding status of my NewsFeed. He includes:
- The one discussed here now
- Unnecessary (variables, etc.) removed

1.) newsfeed.ini

Code: Select all

[Rainmeter]
Update=20
DefaultUpdateDivider=50
AccurateText=1
DynamicWindowSize=1

[Metadata]
Name=NewsFeed Reader (Marquee)
Author=Youkai1977 
Version=03-21.V1 <> 13.02.2021
Information=This Meter is a Part of M.A.R.S.- 2021 Skin Package
License=Creative Commons Attribution-Non-Commercial-Share Alike 4.0

;==================================================
;=== VARIABLES & STYLES ===========================
;==================================================

[Variables]
@include=newsfeeddata.inc

;==================================================
;=== MEASURES NEWS FEED & MARQUEE =================
;==================================================

;=== MEASURES NEWS FEED ===========================

[mRSS]
Measure=WEBPARSER
URL=#RSSUrl#
RegExp="(?siU)<description.*>(.*)</description>.*<link.*>(.*)</link>.*<item.*<title.*>(.*)</title>.*<link.*>(.*)</link>(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)"
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
UpdateRate=60000
StringIndex=1
Debug=1
OnChangeAction=[!ShowMeter HEADNAME][!SetOption HEADNAME FontColor "#Color3##Alpha1#"][!UpdateMeterGroup FEED][!Redraw]
FinishAction=[!SetOption HEADNAME FontColor "#Color4##Alpha1#"][!UpdateMeter HEADNAME][!Redraw]

[mRSSItem1]
Measure=WEBPARSER
URL=[mRSS]
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
StringIndex=3

[mRSSItem2]
Measure=WEBPARSER
URL=[mRSS]
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
StringIndex=5

[mRSSItem3]
Measure=WEBPARSER
URL=[mRSS]
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
StringIndex=7

[mRSSItem4]
Measure=WEBPARSER
URL=[mRSS]
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
StringIndex=9

[mRSSItem5]
Measure=WEBPARSER
URL=[mRSS]
Substitute="&apos;":"'","&quot;":"","&Quot;":"","&amp;":"&","&lt;br&gt;":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE&gt;":"","PRE&gt;":"","&lt;":"","&#39;":"'","&#228;":"ä","&#246;":"ö","&#8211;":"–"
StringIndex=11

;=== MEASURES MARQUEE FUNCTION ====================

[mTimer]
Measure=CALC
Formula=(mTimer % (#StartPos#+#MaxMove#))#Direction#
UpdateDivider=1

[mXPos]
Measure=CALC
Formula=(mTimer+#StartPos#)
UpdateDivider=1

;##################################################
;##################################################
;##################################################
;##################################################
;##################################################
;##################################################

;==================================================
;=== HEAD NEWS FEED READER (Side Lines) ===========
;==================================================

[HEADLINES]
Meter=SHAPE
X=0
Y=0
Shape=Rectangle 0,0,8,8 | Extend ModifiersS1
Shape2=Line 8,4,26,4 | Extend ModifiersL1
Shape3=Rectangle 26,0,8,8 | Extend ModifiersS1
;-----
Shape4=Rectangle 0,16,8,8 | Extend ModifiersS2
Shape5=Line 8,20,26,20 | Extend ModifiersL2
Shape6=Rectangle 26,16,8,8 | Extend ModifiersS2
;-----
Shape7=Rectangle ([HEADNAME:W] + 48),0,8,8 | Extend ModifiersS1
Shape8=Rectangle ([HEADNAME:W] + 48),0,8,8 | Extend ModifiersS1
Shape9=Rectangle ([HEADNAME:W] + 48),16,8,8 | Extend ModifiersS2
Shape10=Rectangle ([HEADNAME:W] + 48),16,8,8 | Extend ModifiersS2
;-----
Shape11=Rectangle 872,0,8,8 | Extend ModifiersS1
Shape12=Line 854,4,872,4 | Extend ModifiersL1
Shape13=Rectangle 846,0,8,8 | Extend ModifiersS1
;-----
Shape14=Rectangle 872,16,8,8 | Extend ModifiersS2
Shape15=Line 854,20,872,20 | Extend ModifiersL2
Shape16=Rectangle 846,16,8,8 | Extend ModifiersS2
ModifiersS1=StrokeWidth 0 | Fill Color #Color3##Alpha2#
ModifiersL1=StrokeWidth 2 | StrokeColor #Color3##Alpha2#
ModifiersS2=StrokeWidth 0 | Fill Color #Color3##Alpha1#
ModifiersL2=StrokeWidth 2 | StrokeColor #Color3##Alpha1#
DynamicVariables=1
UpdateDivider=-1
Group=FEED

[HEADNAME]
Meter=STRING
MeterStyle=StHEAD
X=41
Y=0
LeftMouseUpAction=[#vURL#]

;==================================================
;=== MARQUEE NEWS FEED READER =====================
;==================================================

;=== CONTAINER NEWS FEED ==========================

[CONTAINER_NWF]
Meter=SHAPE
X=0
Y=0
Shape=Line ([HEADNAME:W] + 63),0,839,0 | StrokeWidth 47 | StrokeColor #Color0##Alpha1#
DynamicVariables=1
UpdateDivider=-1
LeftMouseDoubleClickAction=[#vURL#]
Group=FEED

;=== MARQUEE NEWS FEED ============================

[NewsFeed]
Meter=STRING
MeterStyle=StNEWS
X=[mXPos]r
Y=0
2. newsfeeddata.inc

Code: Select all

[Variables]
;********************************************************************************************************************************************************
;********************************************************************************************************************************************************
;***                                                                                                                                               ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;***                                                                                                                                               ******
;********************************************************************************************************************************************************
;********************************************************************************************************************************************************
;==================================================
;=== VARIABLES FONTFACE - SIZE - COLORS ===========
;==================================================
FontFace=SQUARE721 BT
FS1=10
Alpha0=1
Alpha1=255
Alpha2=70
Color0=0,0,0,
Color1=160,246,253,
Color2=48,180,200,
Color3=97,240,255,
Color4=253,193,0,
Color5=255,255,255
;==================================================
;=== VARIABLES NEWS FEED READER ===================
;==================================================
Direction=-1
MaxMove=3600
StartPos=850
RSSUrl=https://news.google.com/rss?pz=1&cf=all&hl=de&gl=DE&ceid=DE:de
vURL=http://news.google.de/
;==================================================
;=== STYLE NEWS FEED HEAD (Side Lines) ============
;==================================================

[StHEAD]
Padding=0,4,-1,5
SolidColor=#Color0##Alpha0#
FontColor=#Color3##Alpha1#
FontFace=#FontFace#
FontSize=#FS1#
StringCase=UPPER
AntiAlias=1
Text=[mRSS]
ClipString=2
ClipStringW=105
ClipStringH=15
DynamicVariables=1
UpdateDivider=-1
Hidden=1
Group=FEED

;==================================================
;=== STLYE NEWS FEED ==============================
;==================================================

[StNEWS]
Padding=0,4,-1,5
SolidColor=#Color0##Alpha0#
FontColor=#Color5##Alpha1#
FontFace=#FontFace#
FontSize=#FS1#
StringCase=UPPER
AntiAlias=1
Text=[\x2022][\x2022][\x2022]  [mRSSItem1]  [\x2022][\x2022][\x2022]  [mRSSItem2]  [\x2022][\x2022][\x2022]  [mRSSItem3]  [\x2022][\x2022][\x2022]  [mRSSItem4]  [\x2022][\x2022][\x2022]  [mRSSItem5]  [\x2022][\x2022][\x2022] 
InlineSetting=Color | #Color1##Alpha1#
InlinePattern=(?i)[mRSSItem1] | [mRSSItem3] | [mRSSItem5]
InlineSetting2=Color | #Color2##Alpha1#
InlinePattern2=(?i)[mRSSItem2] | [mRSSItem4]
DynamicVariables=1
UpdateDivider=1
Container=CONTAINER_NWF
User avatar
balala
Rainmeter Sage
Posts: 12546
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with inline options

Post by balala »

Youkai1977 wrote: March 14th, 2021, 12:09 am DISADVANTAGE of this method, you don't see if the word GOOGLE NEWS changes color when the measure [mRSS] is updated. But the color change part doesn't really work anyway ... see my FinishAction problem.
No, there is nothing wrong with the FinishAction option. Another problem is there. What are you mistaken is that the OnUpdateAction option of a WebParser measure is not executed ONLY when the measure is updated in the sense of going out online to parse the site, but ON EACH, let's say NORMAL update of the meausre. So in this case, since the Update of the skin has been set to Update=20 and the DefaultUpdateDivider to DefaultUpdateDivider=50, the bangs set into the OnUpdateAction option are executed on each 20 x 50 milliseconds = 1000 milliseconds = 1 second. Accordingly, when you get executed the FinishAction, the OnUpdateAction is immediately re-executed and you don't see any change on the color of the meter. Additionally one more: the color of the [HEADNAME] meter is set initially to FontColor=#Color3##Alpha1# (accordingly to the FontColor set into the [StHEAD] section of the newsfeeddata.inc file). But when you get executed the FinishAction option of the [mRSS] measure, the color of the [HEADNAME] meter is set to the same #Color3##Alpha1# color, accordingly to the first bang of the FinishAction option: [!SetOption HEADNAME FontColor "#Color3##Alpha1#"]. So you don't see anychange, not even if you remove the OnUpdateAction option of the same [mRSS] measure.
User avatar
Youkai1977
Posts: 138
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: help with inline options

Post by Youkai1977 »

Ok, so if I understand this correctly, this is total crap what I'm trying to do. :( :uhuh: :-(
But how should the coding look correct way, so that what I want, so that the text GOOGLE NEWS only yellow, during the update process, and when finished, then appears again in blue?
I am really at a loss. :???: Especially in connection with this whole update stuff.
Because I think all the time, that the [mRSS]-Measure and its children-Measures about the DefaultUpdateDivider are clocked. So 1x every 1000ms and NOT 20x

Especially this would be interesting for me since I use Webparser Measures still in another skin, which runs in Update=1000 and the parent Webparser-Measure on UpdateRate=1200, but I don't want to make myself unpopular with the websites and banned as a result. :o :oops: The latter is currently rainmeter.net itself, where I query the current Rainmeter versions

PS.: Did you see my question about the inline setting for the [mRRSItem5]? That seems to work after your tip then but not quite error-free. With the others this also happens. Have in between always feeds that appear in the color white. But is sporadic and therefore difficult for me to identify :???: :confused: