Yincognito wrote: ↑February 28th, 2020, 10:40 pm
It's hard to tell from the scarce info we got,
I understand. Sorry for that. My skin is getting information from a municipial website that is to some extent somewhat privacy sensitive, so i'm not happy with the idea of pasting that all over the internet. I've been working, however, on some basic code to duplicate the problem. This is what i came up with.
Code: Select all
[Rainmeter]
Update=1000
;---------------------------------------------
[Variables]
@include=Test.inc
;------------------------------------
[MeasureOnLoad1]
Measure=Calc
Formula=Counter
IfEqualValue=1
IfEqualAction=[!EnableMeasure MeasureCondition]
UpdateDivider=-1
;------------------------------------
[MeasureCondition]
Measure=String
String=#number#
IfMatch=2
IfMatchAction=[!EnableMeasure MeasureEcho1][!CommandMeasure MeasureEcho1 "Run"]
IfNotMatchAction=[!EnableMeasure MeasureEcho2][!CommandMeasure MeasureEcho2 "Run"]
Disabled=1
;----------------------------------------------
;[MeasureOnLoad2]
;Measure=Calc
;Formula=Counter
;IfEqualValue=5
;IfEqualAction=[!Refresh]
;UpdateDivider=-1
[MeasureOnLoad2]
Measure=Calc
Formula=Counter
IfEqualValue=3
IfEqualAction=[!Refresh]
[!CommandMeasure 12345678 Update][!Redraw]
;[!CommandMeasure MeasureSFISGUGDII Update][!Redraw]
;[!CommandMeasure Measure12345678 Update][!Redraw]
;[!CommandMeasure MeasureWebparser Update][!Redraw]
UpdateDivider=-1
;------------------------------------
[MeasureEcho1]
Measure=Plugin
Plugin=RunCommand
Parameter=echo [Variables] > #CURRENTPATH#Test.inc && echo number=1 >> #CURRENTPATH#Test.inc && echo check=%time% >> #CURRENTPATH#Test.inc
State=Hide
OutputType=ANSI
Disabled=1
[MeasureEcho2]
Measure=Plugin
Plugin=RunCommand
Parameter=echo [Variables] > #CURRENTPATH#Test.inc && echo number=2 >> #CURRENTPATH#Test.inc && echo check=%time% >> #CURRENTPATH#Test.inc
State=Hide
OutputType=ANSI
Disabled=1
;------------------------------------
[Meter1]
;MeasureName=MeasureWebParser
Meter=STRING
X=5
Y=5
FontColor=FFFFFF
FontSize=16
AntiAlias=1
;StringAlign=LEFT
Text= #number#
[Meter2]
Meter=STRING
X=5
Y=31
W=150
H=26
FontColor=FFFFFF
FontSize=16
AntiAlias=1
;StringAlign=LEFT
Text= #check#
You will also need een .inc file (#CURRENTPATH#Test.inc) in the same folder. Here's the basic idea
Code: Select all
[Variables]
number=1
check=11:53:42,54
This code will write a number and a timestamp in your 'local' OS format to the inc file. The goal is that the information in the .inc file should be identical as to that displayed by the skin.
The skin wil on load show the information from the
previous session. I want it to reread the inc file and display the information that was written on load of the
current session
The action to perform in order to check this, is to simply load and unload the skin. 3 seconds after loading the skin, you'll see it updates the information shown and you can verify that is the same as in the inc file.
---
It's the calc measure MeasureOnLoad2 that is the problem here
The following code works
Code: Select all
[MeasureOnLoad2]
Measure=Calc
Formula=Counter
IfEqualValue=3
IfEqualAction=[!Refresh]
[!CommandMeasure 12345678 Update][!Redraw]
UpdateDivider=-1
The bang
Code: Select all
[!CommandMeasure 12345678 Update][!Redraw]
is not even looking for an existing measure. Any name will do.
In my understanding this is all wrong but it refreshes the skin 3 seconds after loading and will then display the same information as was written to the inc. on load of the current session.
I hope you'll understand what i'm trying to do.
The question is:
What is the correct way of achieving this? What is the
correct code for making the reread the inc file and display the updated information.
I appreciate the input you all gave so far and i'm sorry if my question wasn't entirely clear.