It is currently April 27th, 2024, 11:17 pm
Get help with creating, editing & fixing problems with skins
Namus
Posts: 13 Joined: February 19th, 2011, 4:12 pm
Post
by Namus » July 15th, 2012, 4:08 pm
Hi,
i searching in tutorials but with no luck
i simply need more than one result "StringIndex" in single line
something like StringIndex=1,2
for example i have this source code:
Code: Select all
<code>blabla<code>DATE</code>blabla<code>TIME</code>blabla
and my rainmeter code looks like:
Code: Select all
RegExp=(?siU)<code>.*<code>(.*)<code>.*<code>(.*)<code>.*
actual result is:
i need:
thanks for suggestions and sorry my english
jsmorley
Developer
Posts: 22631 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » July 15th, 2012, 4:33 pm
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
[MesureParent]
Measure=Plugin
Plugin=WebParser
Url=http://SomeSite.com
RegExp="(?siU)<code>.*<code>(.*)</code>.*<code>(.*)</code>"
[MeasureChild1]
Measure=Plugin
Plugin=WebParser
Url=[MesureParent]
StringIndex=1
[MeasureChild2]
Measure=Plugin
Plugin=WebParser
Url=[MesureParent]
StringIndex=2
[MeterOne]
Meter=String
MeasureName=MeasureChild1
MeasureName2=MeasureChild2
FontSize=13
FontColor=255,255,255,255
Text=The date is %1 and the time is %2
Namus
Posts: 13 Joined: February 19th, 2011, 4:12 pm
Post
by Namus » July 15th, 2012, 5:15 pm
nice, thanx!
and can i put more Measures in one Meter?
example:
Code: Select all
[Meter]
...
MeasureName=Measure_time1
MeasureName2=Measure_text1
MeasureName3=Measure_time2
MeasureName4=Measure_text2
MeasureName5=Measure_time3
MeasureName6=Measure_text3
Text=%1: %2
Text2=%3: %4
Text3=%5: %6
...
result:
Last edited by Namus on July 15th, 2012, 5:20 pm, edited 1 time in total.
jsmorley
Developer
Posts: 22631 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » July 15th, 2012, 5:19 pm
You can, but I don't really recommend it. Why not have multiple meters?
BTW, this won't work:
Text=%1: %2
Text=%3: %4
Text=%5: %6
You can only have one of ANY option in any given [Section] of a skin. You could do:
Text=%1: %2#CRLF#%3: %4#CRLF#%5: %6
If you are determined to pack this all in one meter.
Namus
Posts: 13 Joined: February 19th, 2011, 4:12 pm
Post
by Namus » July 15th, 2012, 5:24 pm
#CRLF# is a break, nice!
...yes, this I could find by myself
why to use one Meter instead of several? = significantly less code, better handling
KreAch3R
Posts: 608 Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR
Post
by KreAch3R » July 15th, 2012, 8:30 pm
Namus wrote: why to use one Meter instead of several? = significantly less code, better handling
Most of us would say that better handling comes with several meters, than one.
To name the biggest difference, you can change the looks (fontcolor, size, stringstyle etc) of every different meter, where in a single meter version every word has to use the same style.