It is currently April 23rd, 2024, 1:17 pm

Quotes for Rainmeter

Get help with creating, editing & fixing problems with skins
User avatar
deXxterlab97
Posts: 93
Joined: February 5th, 2017, 4:50 am

Quotes for Rainmeter

Post by deXxterlab97 »

I wanna add inspirational quotes for Rainmeter

I already have a list of quotes I can use
https://docs.rainmeter.net/manual/plugins/quote/

But I have trouble understanding few things

1. How would one have quotes auto change every X seconds/minutes to another random quotes?
2. Do I put each quotes I want in each line of the text file to seperate them?

Code: Select all

"Quote"-By A
"Quote02"-By B
deXxterlab97
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Quotes for Rainmeter

Post by jsmorley »

User avatar
deXxterlab97
Posts: 93
Joined: February 5th, 2017, 4:50 am

Re: Quotes for Rainmeter

Post by deXxterlab97 »

how does one make 2 lines of quotes? all i see is each quote is one line only
deXxterlab97
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Quotes for Rainmeter

Post by jsmorley »

deXxterlab97 wrote:how does one make 2 lines of quotes? all i see is each quote is one line only
The default for QuotePlugin is that it uses carriage return / linefeed as the separator, the usual intent is to have one random line of the text file be retrieved on each update. If you don't want that, you will need to do two things:

1) Change the Separator option on the measure to be something else. Perhaps something like ||, something that won't ever appear in the body of the text.

2) In your text file, add that new separator at the end of each segment you want to use as a distinct item.

Code: Select all

Item 1 is text that consists
of more than one line||
Item 2 is also text that consists of
more than one line||
User avatar
deXxterlab97
Posts: 93
Joined: February 5th, 2017, 4:50 am

Re: Quotes for Rainmeter

Post by deXxterlab97 »

jsmorley wrote:The default for QuotePlugin is that it uses carriage return / linefeed as the separator, the usual intent is to have one random line of the text file be retrieved on each update. If you don't want that, you will need to do two things:

1) Change the Separator option on the measure to be something else. Perhaps something like ||, something that won't ever appear in the body of the text.

2) In your text file, add that new separator at the end of each segment you want to use as a distinct item.

Code: Select all

Item 1 is text that consists
of more than one line||
Item 2 is also text that consists of
more than one line||
so it would be

Code: Select all

Separator = ||


or

Code: Select all

Separator = "||"
deXxterlab97
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Quotes for Rainmeter

Post by jsmorley »

deXxterlab97 wrote:so it would be

Code: Select all

Separator = ||


or

Code: Select all

Separator = "||"
Separator=||

Don't use pointless whitespace in options. ;-)

However any of them will work. The quotes are not needed, but won't hurt.
User avatar
deXxterlab97
Posts: 93
Joined: February 5th, 2017, 4:50 am

Re: Quotes for Rainmeter

Post by deXxterlab97 »

jsmorley wrote:Separator=||

Don't use pointless whitespace in options. ;-)

However any of them will work. The quotes are not needed, but won't hurt.
it works but all of the quotes apart from the first line creates a leading empty line

Quote file
"After 5 years you're still Max Caulfield" - Chloe Price/
"Boo yaa! Get it? Boo ya? Like I'm a scary punk ghost." - Chloe Price/
"Max, I'm in a nightmare and I can't wake up, unless I put myself to sleep." - Kate Marsh/
"I wish I could stay in this moment forever. I guess I actually can now, but then it wouldn’t be a moment." - Max Caulfield/
"Max, never Maxine" - Max Caulfield/
Code file

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
FC=255,255,255
FS=25
FF="Dudu Calligraphy"

[MeasureQuotes]
Measure=Plugin
Plugin=QuotePlugin
PathName=#CURRENTPATH#quotes.txt
UpdateDivider=60
Separator="/"

[MeterT]
Meter=String
MeasureName=MeasureQuotes
W=700
ClipString=2
FontFace=#FF#
FontColor=#FC#
FontSize=#FS#
AntiAlias=1
SolidColor=0,0,0,100
deXxterlab97
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Quotes for Rainmeter

Post by jsmorley »

deXxterlab97 wrote:it works but all of the quotes apart from the first line creates a leading empty line

Quote file


Code file

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
FC=255,255,255
FS=25
FF="Dudu Calligraphy"

[MeasureQuotes]
Measure=Plugin
Plugin=QuotePlugin
PathName=#CURRENTPATH#quotes.txt
UpdateDivider=60
Separator="/"

[MeterT]
Meter=String
MeasureName=MeasureQuotes
W=700
ClipString=2
FontFace=#FF#
FontColor=#FC#
FontSize=#FS#
AntiAlias=1
SolidColor=0,0,0,100
Try this:

Code: Select all

[MeasureQuotes]
Measure=Plugin
Plugin=QuotePlugin
PathName=#CURRENTPATH#Test.txt
UpdateDivider=60
Separator=/
RegexpSubstitute=1
Substitute="^\r\n":""
The issue is that when we use "/" as the separator, that is fine, but the items actually end with "/\r\n" or a "/" followed by a carriage return, linefeed. We don't capture the separator, in this case the "/", but we do the carriage return, linefeed. So we need to substitute that off at the beginning of each entry before we use it.

I tried setting Separator=/#CRLF# but that doesn't seem to work. Not sure why, as it feels like it should, but the Substitute will accomplish what we want.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Quotes for Rainmeter

Post by jsmorley »

By the way, I don't exactly follow why you are going this route, since all your examples are on one line, and you are using ClipString=2 to force wrapping where you want it anyway, but so be it...
User avatar
deXxterlab97
Posts: 93
Joined: February 5th, 2017, 4:50 am

Re: Quotes for Rainmeter

Post by deXxterlab97 »

jsmorley wrote:By the way, I don't exactly follow why you are going this route, since all your examples are on one line, and you are using ClipString=2 to force wrapping where you want it anyway, but so be it...
Different font size and text makes it larger than one line
deXxterlab97