It is currently April 27th, 2024, 2:20 pm

How to change color depends on your pc time

Get help with creating, editing & fixing problems with skins
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: How to change color depends on your pc time

Post by JpsCrazy »

fabularasa wrote:And how to exclude Saturdays and Sundays?
You can make another measure that measures the days numerically, run it through a calc and use conditions to exclude the weekend and if it is the weekend have a !bang that disables the open/closed measure and a !bang that shows "Stock Closed"

Code: Select all

[msDay]
Measure=Time
Format=%w

[msDayCalc]
Measure=Calc
Formula=[msDay]>0?1:([msDay]<6?1:0)
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterDisableMeasure CheckStockStatus][!RainmeterShowMeter StocksClosed][!RainmeterRedraw]
IfBelowValue=1
IfBelowAction=!Execute [!RainmeterEnableMeasure CheckStockStatus][!RainmeterHideMeter StocksClosed][!RainmeterRedraw]
Not tested, but that should at the least get you started.
User avatar
Shark1502
Posts: 56
Joined: February 27th, 2011, 2:01 pm
Location: London

Re: How to change color depends on your pc time

Post by Shark1502 »

Yes. Either change the Update value in the Rainmeter section or add an updaterate value to the checkstock meter. If Update=1000 (1000ms = 1second) then the update rate is 15*60 (ie. 900)

And you can also set up another measure to measure the day and then use IfActions and then use RainmeterSetVariable to alter the update rate or simply to deactivate the measures/meters using RainmeterDisableMeasure.

Also sorry for the late reply. Hope the help is not too late.
User avatar
Shark1502
Posts: 56
Joined: February 27th, 2011, 2:01 pm
Location: London

Re: How to change color depends on your pc time

Post by Shark1502 »

Oh sorry didn't see the last post. JpsCrazy got there waaay before me lol
User avatar
Shinson
Posts: 17
Joined: April 14th, 2011, 5:45 am

Re: How to change color depends on your pc time

Post by Shinson »

OK... forget about my post... already posted. Looks like JpsCrazy and Shark1502 are superway faster than me... ;)

Regards,
Shinson
What doesn't kill you, just makes you stranger.
User avatar
fabularasa
Posts: 76
Joined: February 26th, 2011, 12:51 am
Location: Poland

Re: How to change color depends on your pc time

Post by fabularasa »

Thank You!

It works like that:

[MeasureDay]
Measure=Time
Format=%w

[MeasureDayCalc]
Measure=Calc
Formula=[MeasureDay] > 6 ? 2 : ([MeasureDay] > 0 ? 1 : 0)
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterEnableMeasure CheckStatus]
IfAboveValue=1
IfAboveAction=!Execute [!RainmeterDisableMeasure CheckStatus]
IfBelowValue=1
IfBelowAction=!Execute [!RainmeterDisableMeasure CheckStatus]
User avatar
fabularasa
Posts: 76
Joined: February 26th, 2011, 12:51 am
Location: Poland

Re: How to change color depends on your pc time

Post by fabularasa »

I thought that it works bu it doesn't:

Code: Select all

Formula=[MeasureDay] > 6 ? 2 : ([MeasureDay] > 0 ? 1 : 0)
The same problem with:

Code: Select all

Formula=[msDay]>0?1:([msDay]<6?1:0)
by JpsCrazy


It shows data for: Monday - Saturday but it should works fo Monday - Friday :???: