It is currently May 22nd, 2024, 1:12 am

Daily text changer

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

Re: Daily text changer

Post by jsmorley »

dv-ent wrote:is there a way we could show todays text and tomorrows text ?

would we need a calc ?
What you need is the latest beta from http://rainmeter.net and this:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[MeasureDaysText]
Measure=Plugin
Plugin=WebParser
URL=file://#CURRENTPATH#Test.txt
RegExp="(?siU)<0>(.*)</0>.*<1>(.*)</1>.*<2>(.*)</2>.*<3>(.*)</3>.*<4>(.*)</4>.*<5>(.*)</5>.*<6>(.*)</6>"

[Measure0]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=1

[Measure1]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=2

[Measure2]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=3

[Measure3]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=4

[Measure4]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=5

[Measure5]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=6

[Measure6]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=7

[MeasureCurrent]
Measure=Time

[MeasureToday]
Measure=Time
TimeStamp=[MeasureCurrent:]
Format=%w
Substitute="0":"[Measure0]","1":"[Measure1]","2":"[Measure2]","3":"[Measure3]","4":"[Measure4]","5":"[Measure5]","6":"[Measure6]"
DynamicVariables=1

[MeasureTomorrow]
Measure=Time
Format=%w
TimeStamp=([MeasureCurrent:] + 86400)
Substitute="0":"[Measure0]","1":"[Measure1]","2":"[Measure2]","3":"[Measure3]","4":"[Measure4]","5":"[Measure5]","6":"[Measure6]"
DynamicVariables=1

[MeterOne]
Meter=String
MeasureName=MeasureToday
MeasureName2=MeasureTomorrow
FontSize=14
FontColor=255,255,255,255
AntiAlias=1
Text=%1#CRLF##CRLF#%2
http://rainmeter.net/forum/viewtopic.php?p=76040#p76040
dv-ent
Posts: 62
Joined: November 13th, 2011, 11:43 am

Re: Daily text changer

Post by dv-ent »

perfect - i was wondering how the new timestamp feature could be used !!
Soldiershak
Posts: 13
Joined: September 8th, 2012, 6:42 am

Re: Daily text changer

Post by Soldiershak »

Okay so I put the text file together here's the code you gave me I only changed the "test.txt" to "Put Your Text Here.text" and the font size

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[MeasureDaysText]
Measure=Plugin
Plugin=WebParser
URL=file://#CURRENTPATH#Put Your Text 

Here.txt
RegExp="(?siU)<0>(.*)</0>.*<1>(.*)</1>.*<2>

(.*)</2>.*<3>(.*)</3>.*<4>(.*)</4>.*<5>(.*)

</5>.*<6>(.*)</6>"

[Measure0]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=1

[Measure1]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=2

[Measure2]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=3

[Measure3]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=4

[Measure4]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=5

[Measure5]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=6

[Measure6]
Measure=Plugin
Plugin=WebParser
URL=[MeasureDaysText]
StringIndex=7

[MeasureDay]
Measure=Time
Format=%w
Substitute="0":"[Measure0]","1":"[Measure1]",

"2":"[Measure2]","3":"[Measure3]","4":"[Measu

re4]","5":"[Measure5]","6":"[Measure6]"
DynamicVariables=1

[MeterOne]
Meter=String
MeasureName=MeasureDay
FontSize=7
FontColor=255,255,255,255
AntiAlias=1
"Put Your Text Here.txt" code.I used enter and a lot of spaces to center the second line of text.I believe there is a simpler way to get the same effect

Code: Select all

Press enter within the sentence to add rows
SUNDAY==================================================
<0>Sunday Text</0>

MONDAY==================================================
<1>Monday Text</1>   MONDAY

TUESDAY=================================================
<2>Tuesday Text</2>  TUESDAY

WEDNESDAY===============================================
<3>Wednesday Text</3> WEDNESDAY

THURSDAY================================================
<4>Thursday Text</4>   THURSDAY

FRIDAY==================================================
<5>Friday Text</5>      FRIDAY

SATURDAY================================================

<6>Peace I Leave With You; My Peace I Give You.I Do Not Give To You As The World Gives.
                         Do Not Let Your Heart Be Troubled And Do Not Be Afraid.</6>
How do I change the font itself though?I would like to have the font in the skins folder so I don't have to install the font in order for it to use the font.I've see this in a lot of skin folders.


Here's my desktop so far (the skin is located mid-bottom-top row)It's a Hi-Res screenshot just in case your net is slow
Image
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Daily text changer

Post by MerlinTheRed »

You can specify the font with "FontFace". See the manual for all string meter options (you can center the text automatically by using StringAlign=Center etc.).
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Daily text changer

Post by jsmorley »

What I would do is set the W= on the string meter to be wide enough to hold the longest "line" (not the entire day text, just a single "line") in your text file. Give it as much as you can to fit on your screen without running into other things. Then set the X= on the meter to be in the center of that W= value.

So for example:

Code: Select all

[MeterOne]
Meter=String
MeasureName=MeasureToday
FontSize=14
FontColor=255,255,255,255
AntiAlias=1
W=800
X=400
StringAlign=Center
BTW, when you hit "enter" in your text file to put a single day's text on two lines, be sure to remove any trailing space on the first line, so it centers correctly.
Soldiershak
Posts: 13
Joined: September 8th, 2012, 6:42 am

Re: Daily text changer

Post by Soldiershak »

Thanks for all your help guys.The skin works perfectly.I've wanted a skin that did this for the longest.Thanks again guys and God bless you guys in a non-physical way