It is currently March 29th, 2024, 3:40 pm

Log message

Get help with creating, editing & fixing problems with skins
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Log message

Post by xenium »

Hi,
I would like that when the skin is loaded or refreshed, a message will appear in the log ,like [! Log "TEXT"]

Is that possible?
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Log message

Post by balala »

xenium wrote:Hi,
I would like that when the skin is loaded or refreshed, a message will appear in the log ,like [! Log "TEXT"]

Is that possible?
It is. Add the following option to the [Rainmeter] section: OnRefreshAction=[!Log "TEXT"]. The OnRefreshAction is executed every time you1re refreshing / loading the skin. The !Log bang sends the desired string to the log.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Log message

Post by xenium »

balala wrote:It is. Add the following option to the [Rainmeter] section: OnRefreshAction=[!Log "TEXT"]. The OnRefreshAction is executed every time you1re refreshing / loading the skin. The !Log bang sends the desired string to the log.
Thank you very much :bow:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Log message

Post by balala »

Glad to help.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Log message

Post by xenium »

For the log message in the option OnRefreshAction=[!Log "TEXT"], can it be set to appear with a delay of 3 seconds ?

Thank you
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Log message

Post by jsmorley »

xenium wrote:For the log message in the option OnRefreshAction=[!Log "TEXT"], can it be set to appear with a delay of 3 seconds ?

Thank you
Remove the OnRefreshAction, then add a measure:

[MeasureDelay]
Measure=Calc
Formula=MeasureDelay + 1
IfCondition=MeasureDelay = 3
IfTrueAction=[!Log "TEXT"]

Note that this assumes that Update in [Rainmeter] is the default 1000. If it is not, you need to adjust the value to check for accordingly.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Log message

Post by xenium »

jsmorley wrote:Remove the OnRefreshAction, then add a measure:

[MeasureDelay]
Measure=Calc
Formula=MeasureDelay + 1
IfCondition=MeasureDelay = 3
IfTrueAction=[!Log "TEXT"]

Note that this assumes that Update in [Rainmeter] is the default 1000. If it is not, you need to adjust the value to check for accordingly.
Thank you very much ! :bow:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Log message

Post by jsmorley »

xenium wrote:Thank you very much ! :bow:
Glad to help. On reflection, since the measure value will start at 1 and not 0, to get exactly three seconds you would want:

[MeasureDelay]
Measure=Calc
Formula=MeasureDelay + 1
IfCondition=MeasureDelay = 4
IfTrueAction=[!Log "TEXT"]

Or:

[MeasureDelay]
Measure=Calc
Formula=MeasureDelay + 1
IfCondition=MeasureDelay > 3
IfTrueAction=[!Log "TEXT"]
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Log message

Post by balala »

jsmorley's solution, as usually, is good, but instead I'd probably add a !Delay bang to the OnRefreshAction option: OnRefreshAction=[!Delay "3000"][!Log "TEXT"].