It is currently February 4th, 2023, 2:56 am

LOAD IMAGE ON SPECIFIC TIME

Get help with creating, editing & fixing problems with skins
vapn.sub
Posts: 7
Joined: February 20th, 2010, 6:25 am

Re: LOAD IMAGE ON SPECIFIC TIME

Post by vapn.sub »

Hi Alex2539,

it worked perfectly with following code:

[MeasureImage]
Measure=Calc
Formula=MeasureHour*100+(MeasureMinute<30 ? 0 : 30)

Can you please explain me what does this line mean & do
(MeasureMinute<30 ? 0 : 30)

Thanks to Chowtoy and all other guys who helped me to solve this issue.

Cheers,
vapn
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: LOAD IMAGE ON SPECIFIC TIME

Post by Alex2539 »

vapn.sub wrote:Can you please explain me what does this line mean & do
(MeasureMinute<30 ? 0 : 30)
That is a conditional statement. It follows this format:

Code: Select all

(True/False condition) ? (value if True) : (value if False)
So in the case of "(MeasureMinute<30 ? 0 : 30)", first it checks if MeasureMinute is less that 30. If it is, it gives "0" as a value. If it is not less than 30, it gives "30" as a value. Then that value is put in with the rest of the formula.
ImageImageImageImage
vapn.sub
Posts: 7
Joined: February 20th, 2010, 6:25 am

Re: LOAD IMAGE ON SPECIFIC TIME

Post by vapn.sub »

Alex2539 wrote:That is a conditional statement. It follows this format:

Code: Select all

(True/False condition) ? (value if True) : (value if False)
So in the case of "(MeasureMinute<30 ? 0 : 30)", first it checks if MeasureMinute is less that 30. If it is, it gives "0" as a value. If it is not less than 30, it gives "30" as a value. Then that value is put in with the rest of the formula.

Thanks Alex,
That exactly what I need. and thanks for explaining to me too.
have a nice day,
vapn
Shultzy
Posts: 1
Joined: March 17th, 2010, 9:09 pm

Re: LOAD IMAGE ON SPECIFIC TIME

Post by Shultzy »

Is it possible to change this code so instead of images, it changes a specific string of text every half hour? I have 33 strings of text that I want rotating (randomly if possible), on a regular basis.

Thanks, Jacob.