It is currently March 28th, 2024, 9:31 am

Creating Rainmeter Notification Application

Get help with creating, editing & fixing problems with skins
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: Creating Rainmeter Notification Application

Post by fonpaolo »

jsmorley wrote:NOOO!
...
Sorry... I forgot to turn on my brain, before writing. :17oops
mobileqa
Posts: 32
Joined: March 26th, 2018, 1:09 pm

Re: Creating Rainmeter Notification Application

Post by mobileqa »

Hey I'm having issues with the application Writing the Key values. When I make changes to the JSON File to update the date , the raimeter will Fetch the URL , but sometimes it wont Write the variable even though I know the timestamp is greater that the last one.
mobileqa
Posts: 32
Joined: March 26th, 2018, 1:09 pm

Re: Creating Rainmeter Notification Application

Post by mobileqa »

Back to my original problem. I changed the #DelaySeconds# and the skin still fades way in 9 sec regardless of changing the time. Any Ideas.


The trick is how big you make #DelaySeconds# in [Variables]. That !Delay bang is just to give the skin a second for the "fade" to work before the meters are "hidden".
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Creating Rainmeter Notification Application

Post by jsmorley »

mobileqa wrote:Back to my original problem. I changed the #DelaySeconds# and the skin still fades way in 9 sec regardless of changing the time. Any Ideas.


The trick is how big you make #DelaySeconds# in [Variables]. That !Delay bang is just to give the skin a second for the "fade" to work before the meters are "hidden".
I'd have to see your code.
mobileqa
Posts: 32
Joined: March 26th, 2018, 1:09 pm

Re: Creating Rainmeter Notification Application

Post by mobileqa »

I'm trying to get the Skin to Show and stay active for [X] time frame and then hide/fade. Right now the skin appears and fades to fast.

Code: Select all

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=100
UpdateRate=300
;Background=Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=2
;BackgroundMargins=0,34,0,14
;SolidColor=131,134,137
SolidColor=62,63,65
DynamicWindowSize=1
AccurateText=1
;FadeDuration=200
OnRefreshAction=[!Hide]

[Variables]

; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=9
colorBar=235,170,0,255
colorText=255,255,255,205
DelaySeconds=300
LatestTime=13167138420

[MeasureSite]
Measure=WebParser
;OnChangeAction=[!show "#CurrentConfig#"][!UpdateMeter "MeterItem1Title"][!Redraw]

FinishAction=[!EnableMeasureGroup Times][!UpdateMeasureGroup Times][!UpdateMeasure MeasureItem1Title] [!UpdateMeasure MeasureItem1Desc] [!UpdateMeasure MeasureItem1URL]

[MeasureTestTime]
Measure=Time
Group=Times
TimeStamp=[MeasureItem1Date]
TimeStampFormat=%m/%d/%Y %H:%M
Disabled=1
DynamicVariables=1
UpdateDivider=-1
IfCondition=[MeasureTestTime:timestamp] > #LatestTime#
IfTrueAction=[!WriteKeyValue Variables LatestTime "[MeasureTestTime:timestamp]"][!SetVariable LatestTime "[MeasureTestTime:timestamp]"][!Show "#CurrentConfig#"][!Delay 9000][!ShowFade][!EnableMeasure MeasureSeconds]

[MeasureSeconds]
Measure=Calc
Formula=MeasureSeconds + 1
IfCondition=MeasureSeconds = #DelaySeconds#
IfTrueAction=[!HideFade][!Delay 19000][!Hide "#CurrentConfig#"][!DisableMeasure MeasureSeconds]
Disabled=1
DynamicVariables=1
Last edited by jsmorley on April 2nd, 2018, 2:46 pm, edited 1 time in total.
Reason: Please use [code] [/code] tags
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Creating Rainmeter Notification Application

Post by jsmorley »

mobileqa wrote:I'm trying to get the Skin to Show and stay active for [X] time frame and then hide/fade. Right now the skin appears and fades to fast.

Code: Select all

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=100
UpdateRate=300
;Background=Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=2
;BackgroundMargins=0,34,0,14
;SolidColor=131,134,137
SolidColor=62,63,65
DynamicWindowSize=1
AccurateText=1
;FadeDuration=200
OnRefreshAction=[!Hide]

[Variables]

; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=9
colorBar=235,170,0,255
colorText=255,255,255,205
DelaySeconds=300
LatestTime=13167138420

[MeasureSite]
Measure=WebParser
;OnChangeAction=[!show "#CurrentConfig#"][!UpdateMeter "MeterItem1Title"][!Redraw]

FinishAction=[!EnableMeasureGroup Times][!UpdateMeasureGroup Times][!UpdateMeasure MeasureItem1Title] [!UpdateMeasure MeasureItem1Desc] [!UpdateMeasure MeasureItem1URL]

[MeasureTestTime]
Measure=Time
Group=Times
TimeStamp=[MeasureItem1Date]
TimeStampFormat=%m/%d/%Y %H:%M
Disabled=1
DynamicVariables=1
UpdateDivider=-1
IfCondition=[MeasureTestTime:timestamp] > #LatestTime#
IfTrueAction=[!WriteKeyValue Variables LatestTime "[MeasureTestTime:timestamp]"][!SetVariable LatestTime "[MeasureTestTime:timestamp]"][!Show "#CurrentConfig#"][!Delay 9000][!ShowFade][!EnableMeasure MeasureSeconds]

[MeasureSeconds]
Measure=Calc
Formula=MeasureSeconds + 1
IfCondition=MeasureSeconds = #DelaySeconds#
IfTrueAction=[!HideFade][!Delay 19000][!Hide "#CurrentConfig#"][!DisableMeasure MeasureSeconds]
Disabled=1
DynamicVariables=1
Leave Update in [Rainmeter] at 1000, there is no possible reason to change this to 100. What that does is change the meaning of DelaySeconds to Delay10thsOfSeconds.

UpdateRate has no meaning in [Rainmeter]

Leave the !Delay bang at 1000 in all places. That has nothing to do with how long the skin / meters stay visible, and shouldn't be changed.

Then set DelaySeconds in [Variables] to the number of seconds you want the skin to stay visible. That variable is used by:

Code: Select all

[MeasureSeconds]
Measure=Calc
Formula=MeasureSeconds + 1
IfCondition=MeasureSeconds = #DelaySeconds#
IfTrueAction=[!HideFade][!Delay 1000][!Hide "#CurrentConfig#"][!DisableMeasure MeasureSeconds]
Disabled=1
DynamicVariables=1
What this does when enabled is start counting from 1. When the value of this measure reaches the same value that #DelaySeconds# is in [Variables], the action(s) will be taken.

Since with Update=1000 in [Rainmeter], the skin, and thus this measure, will be updated once a second, that means that it will count to 10 in 10 seconds, 30 in 30 seconds, etc.

BTW, in my original example, I was hiding the meters as well as hiding the skin, but if you don't want this, and on reflection I'm not sure you do, then:

Code: Select all

[MeasureSeconds]
Measure=Calc
Formula=MeasureSeconds + 1
IfCondition=MeasureSeconds = #DelaySeconds#
IfTrueAction=[!HideFade][!DisableMeasure MeasureSeconds]
Disabled=1
DynamicVariables=1
Is all you need. Make sure you do the same on the LeftMouseUpAction on whatever meter you are using for "dismiss" by the user.

This is redundant:
[!HideFade][!Delay 1000][!Hide "#CurrentConfig#"]
Both bangs do the same thing, just one "fades" out and one "blinks" out.
mobileqa
Posts: 32
Joined: March 26th, 2018, 1:09 pm

Re: Creating Rainmeter Notification Application

Post by mobileqa »

Thanks
mobileqa
Posts: 32
Joined: March 26th, 2018, 1:09 pm

Re: Creating Rainmeter Notification Application

Post by mobileqa »

That Work. Another Question

How Would I modify the code for the following scenario:
- show the Skin based on latest time then only hide the skin when the close button is pressed. Right now I commended out [MeasureSeconds] , but the skin still autofade


[MeasureTestTime]
Measure=Time
Group=Times
TimeStamp=[MeasureItem1Date]
TimeStampFormat=%m/%d/%Y %H:%M
Disabled=1
DynamicVariables=1
UpdateDivider=-1
IfCondition=[MeasureTestTime:timestamp] > #LatestTime#
IfTrueAction=[!WriteKeyValue Variables LatestTime "[MeasureTestTime:timestamp]"][!SetVariable LatestTime "[MeasureTestTime:timestamp]"][!Show "#CurrentConfig#"]

[MeasureSeconds]
; Measure=Calc
; Formula=MeasureSeconds + 1
; IfCondition=MeasureSeconds = #DelaySeconds#
; ;IfTrueAction=[!HideFade][!Delay 1000][!Hide "#CurrentConfig#"][!DisableMeasure MeasureSeconds]
; ;IfTrueAction=[!HideFade][!DisableMeasure MeasureSeconds]
; Disabled=1
; DynamicVariables=1
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Creating Rainmeter Notification Application

Post by jsmorley »

No it doesn't... You must not be refreshing the skin after you made the changes.
mobileqa
Posts: 32
Joined: March 26th, 2018, 1:09 pm

Re: Creating Rainmeter Notification Application

Post by mobileqa »

Right Skin wasn't refreshed. When using URL's and regular expressions , is there a way to change the frequency that Rainmeter Fetch the Data.
Post Reply