It is currently April 27th, 2024, 8:53 am

StringIndex=1,2

Get help with creating, editing & fixing problems with skins
Namus
Posts: 13
Joined: February 19th, 2011, 4:12 pm

StringIndex=1,2

Post by Namus »

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:

Code: Select all

DATE
TIME
i need:

Code: Select all

DATE TIME

thanks for suggestions and sorry my english
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: StringIndex=1,2

Post by jsmorley »

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

Re: StringIndex=1,2

Post by Namus »

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:

Code: Select all

TIME: TEXT
TIME: TEXT
TIME: TEXT
Last edited by Namus on July 15th, 2012, 5:20 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: StringIndex=1,2

Post by jsmorley »

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

Re: StringIndex=1,2

Post by Namus »

#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 :)
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: StringIndex=1,2

Post by KreAch3R »

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.
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image