It is currently April 28th, 2024, 5:14 pm

How to change color depends on your pc time

Get help with creating, editing & fixing problems with skins
User avatar
fabularasa
Posts: 76
Joined: February 26th, 2011, 12:51 am
Location: Poland

How to change color depends on your pc time

Post by fabularasa »

I've done this skin
http://fabularasa.deviantart.com/art/Rainmeter-Currency-Stock-beta-200401211

But there's still problem with changing text color when the stock session is open.

That one change color when stock is Up or Down

Code: Select all

[CheckStockColor1]
Measure=Calc
Formula=[Stock_ColorChange1]
IfBelowValue=0
IfBelowAction=!execute [!RainmeterHideMeter StockChange1Up][!RainMeterShowMeter StockChange1Down][!RainMeterHideMeter StockChange1Off][!RainMeterShowMeter StockTxt1On][!RainmeterHideMeter StockTxt1Off][!RainmeterRedraw]
IfEqualValue=0
IfEqualAction=!execute [!RainMeterShowMeter StockChange1Up][!RainMeterHideMeter StockChange1Down][!RainMeterHideMeter StockChange1Off][!RainMeterShowMeter StockTxt1On][!RainmeterHideMeter StockTxt1Off][!RainmeterRedraw]
DynamicVariables=1 
That one change color when stock is Closed or Open

Code: Select all

[CheckStockStatus1]
Measure=Calc
Formula=[Stock_ColorStatus1]
IfBelowValue=0
IfBelowAction=!execute [!RainmeterHideMeter StockChange1Up][!RainmeterHideMeter StockChange1Down][!RainMeterShowMeter StockChange1Off][!RainmeterHideMeter StockTxt1On][!RainMeterShowMeter StockTxt1Off][!RainmeterRedraw]
IfEqualValue=0
IfEqualAction=!execute [!RainmeterRedraw]
DynamicVariables=1
Now I try diffrent combinations to make it work - it takes time because I have to wait for stock opening :)

Second problem - I can't find a web with information about session closed or open so maybe there's a way to use my local computer time to change color, for ex. I know that stock X is open at 1pm and closed 10pm - now my skin should change colors at that times
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 »

Have you been able to use your computer time to do this?
I would imagine if you wanted it to be open from 9-5 you could do something like this:

Code: Select all

[MeasureTime]
Measure=Time
Format=%H
IfAboveValue=17
IfAboveAction=!Execute [!RainmeterHideMeter StocksOpen][!RainmeterShowMeter StocksClosed]
IfBelowValue=9
IfBelowAction=!Execute [!RainmeterHideMeter StocksOpen][!RainmeterShowMeter StocksClosed]
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 »

what about 09:15-16:40 ;)
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: How to change color depends on your pc time

Post by smurfier »

fabularasa wrote:what about 09:15-16:40 ;)
Try this:

Code: Select all

[MeasureTime]
Measure=Time
Format=%H.%M
IfAboveValue=4.40
IfAboveAction=!Execute [!RainmeterHideMeter StocksOpen][!RainmeterShowMeter StocksClosed]
IfBelowValue=9.15
IfBelowAction=!Execute [!RainmeterHideMeter StocksOpen][!RainmeterShowMeter StocksClosed]
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
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 »

I second smurfier.
Work out ok?
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 »

Shark1502 wrote:I second smurfier.
Work out ok?
I'm sorry still waiting for time switch (changing the clocks) to set open and close time.
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 »

fabularasa wrote: I'm sorry still waiting for time switch (changing the clocks) to set open and close time.
AFAIK unless you're in a country (or the feed is from a country) where they don't do DST (daylight savings time) then they're shouldn't be an issue with when you do this. If you set your start time to 9:30 it should remain at 9:30 (assuming the clocks change at the same time in both places)

Still, hope it works out :)
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 »

Shark1502 wrote: AFAIK unless you're in a country (or the feed is from a country) where they don't do DST (daylight savings time) then they're shouldn't be an issue with when you do this. If you set your start time to 9:30 it should remain at 9:30 (assuming the clocks change at the same time in both places)

Still, hope it works out :)
I'm just doing different skin now.

For ex. http://www.bloomberg.com/apps/quote?ticker=UKX:IND now starts at 4am a week ago they start at 3am - before I start I want to check every stock which I want to have (open and close time - to compare it with my local time) and do it all together. :???:
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 »

smurfier wrote: Try this:

Code: Select all

[MeasureTime]
Measure=Time
Format=%H.%M
IfAboveValue=4.40
IfAboveAction=!Execute [!RainmeterHideMeter StocksOpen][!RainmeterShowMeter StocksClosed]
IfBelowValue=9.15
IfBelowAction=!Execute [!RainmeterHideMeter StocksOpen][!RainmeterShowMeter StocksClosed]

There's no if... for StocksOpen (Time between 9.15 - 4.40)
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 »

Code: Select all

[MeasureTime]
Measure=Time
Format=%H.%M

[CheckStockStatus] 
Measure=Calc
Formula=MeasureTime > 16:40 ? 2 : (MeasureTime > 9:15 ? 1 : 0)
IfEqualValue=1
IfEqualAction=!execute [!RainmeterShowMeter StocksOpen][!RainmeterHideMeter StocksClosed][!RainmeterRedraw]
IfAboveValue=1
IfAboveAction=!execute [!RainmeterHideMeter StocksOpen][!RainmeterShowMeter StocksClosed][!RainmeterRedraw]
IfBelowValue=1
IfBelowAction=!execute [!RainmeterHideMeter StocksOpen][!RainmeterShowMeter StocksClosed][!RainmeterRedraw]
That one works (for now..)

I will have about 60-70 measures like CheckStockStatus. I think it may slow down may old computer to check that mesures on every minute is there possibillity to check that status on every 15 minutes or/and UpdateRate.

And how to exclude Saturdays and Sundays?