I was wondering if you guys know of any skins that allows you to enter your own text for each day of the week.An example would be on Monday you see text 1,on Tuesday you see text 2 etc.I would like to display the text horizontally and use a minimal amount of code because I'm trying to keep my rainmeter under a certain memory.
If you don't have any skins do you think you guys can help me make one?I'm not a coder what so ever.And Thanks
It is currently May 21st, 2024, 12:06 pm
Daily text changer
-
- Posts: 13
- Joined: September 8th, 2012, 6:42 am
Re: Daily text changer
any skin that displays time/data as a string can do that.
have a look at how time is formatted:
http://rainmeter.net/cms/Measures-Time_beta
and then use Substitute for your text:
http://rainmeter.net/cms/Measures-Substitute_beta
have a look at how time is formatted:
http://rainmeter.net/cms/Measures-Time_beta
and then use Substitute for your text:
http://rainmeter.net/cms/Measures-Substitute_beta
-
- Developer
- Posts: 22634
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Daily text changer
Won't make the whole thing for you, but here is the meat and potatoes of one way to do it:
What we are doing is using WebParser to parse a text file:
Then we are creating a WebParser "child" measure for each of the "days".
Now we get the day of the week as a number using a Measure=Time, and Substitute the number for the name of the appropriate "child" measure.
Then in the String meter, we just use the string value of that Time measure as the MeasureName= of the string meter, and bingo...
Edit: Alex's approach is fine as well, if you want to just edit the .ini when you want to change the text for any given day, and just hard code the text directly into the Substitute for the Time measure. That does have the advantage of eliminating the need for any WebParser measures at all. I'd probably be tempted personally to go the WebParser route, only because depending on how long and involved the text is for each day, that Substitute statement can be pretty long and easy to make a typo in.
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
[MeasureDay]
Measure=Time
Format=%w
Substitute="0":"[Measure0]","1":"[Measure1]","2":"[Measure2]","3":"[Measure3]","4":"[Measure4]","5":"[Measure5]","6":"[Measure6]"
DynamicVariables=1
[MeterOne]
Meter=String
MeasureName=MeasureDay
FontSize=14
FontColor=255,255,255,255
AntiAlias=1
Code: Select all
<0>Sunday Text</0>
<1>Monday Text</1>
<2>Tuesday Text</2>
<3>Wednesday Text</3>
<4>Thursday Text</4>
<5>Friday Text</5>
<6>Saturday Text</6>
Now we get the day of the week as a number using a Measure=Time, and Substitute the number for the name of the appropriate "child" measure.
Then in the String meter, we just use the string value of that Time measure as the MeasureName= of the string meter, and bingo...
Edit: Alex's approach is fine as well, if you want to just edit the .ini when you want to change the text for any given day, and just hard code the text directly into the Substitute for the Time measure. That does have the advantage of eliminating the need for any WebParser measures at all. I'd probably be tempted personally to go the WebParser route, only because depending on how long and involved the text is for each day, that Substitute statement can be pretty long and easy to make a typo in.
-
- Posts: 13
- Joined: September 8th, 2012, 6:42 am
Re: Daily text changer
The skin I want to create isn't using any type of internet connection.I'd imagine it just reading from a text file and cycling through each sentence throughout the week.I wan't to put 7 bible verses and have one display each day of the week for encouragement etc I'd just copy and paste text there.
Sorry if I misunderstood I saw the word web in webparser so I assumed web as in internet.
And thanks you guys I'll look into the code once I get back home
Sorry if I misunderstood I saw the word web in webparser so I assumed web as in internet.
And thanks you guys I'll look into the code once I get back home
Last edited by Soldiershak on September 8th, 2012, 2:35 pm, edited 1 time in total.
-
- Developer
- Posts: 22634
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Daily text changer
No internet connection needed for my code. WebParser is just reading a local text file in the same folder with your skin.Soldiershak wrote:The skin I want to create isn't using any type of internet connection.I'd imagine it just reading from a text file and cycling through each sentence throughout the week.I wan't to put 7 bible verses and have one display each day of the week for encouragement etc I'd just copy and paste text there.
And thanks you guys I'll look into the code once I get back home
-
- Posts: 13
- Joined: September 8th, 2012, 6:42 am
Re: Daily text changer
Oh okay lol I saw the word web so I assumed.I guess it's time I learn how to make skins anyway thanks guys.And just to make sure do I need to make any PNG files?
-
- Developer
- Posts: 22634
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Daily text changer
Nope, not unless you want some images for some reason.Soldiershak wrote:Oh okay lol I saw the word web so I assumed.I guess it's time I learn how to make skins anyway thanks guys.And just to make sure do I need to make any PNG files?
-
- Posts: 13
- Joined: September 8th, 2012, 6:42 am
Re: Daily text changer
Oh okay thanks for taking the time to help me out.I'll start putting the TXT file together when I get home.If I need help I'll just post here again.
-
- Developer
- Posts: 22634
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Daily text changer
Feel free. We are glad to help.Soldiershak wrote:Oh okay thanks for taking the time to help me out.I'll start putting the TXT file together when I get home.If I need help I'll just post here again.
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
Re: Daily text changer
is there a way we could show todays text and tomorrows text ?
would we need a calc ?
would we need a calc ?