It is currently March 28th, 2024, 7:07 pm

[SOLVED] UpdateMeter from external program

Get help with creating, editing & fixing problems with skins
russdirks
Posts: 12
Joined: June 9th, 2016, 4:53 am

[SOLVED] UpdateMeter from external program

Post by russdirks »

EDIT: Sorry ... never mind, I found the problem. My external program was out of sync, not Rainmeter. The SetOption directly into the Meter is working fine.

------------------------------

I've been setting measure values in my gauges from an external program using the WM_COPYDATA technique described under the 'developer' sections of the docs, and it has been working fine. I would basically do a !SetOption followed by an !UpdateMeasure, as follows:

Code: Select all

[!SetOption "Measure_BlockNumber" "String" "1561487" "MVis\Activity"]
[!UpdateMeasure "Measure_BlockNumber" "MVis\Activity"]
But then it occurred to me to use !SetOption to set the value directly into the meter's 'Text' value, bypassing the measure all together, something like this:

Code: Select all

[!SetOption "Meter_BlockNumberValue" "Text" "3345565" "MVis\Network"]
[!UpdateMeter "Meter_BlockNumberValue" "MVis\Network"]
[!Redraw "MVis\Network"]
What I'm finding though is that the value does not update immediately ... it lags by one update cycle. Is there something I'm doing wrong? Here's the complete gauge:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
Background=#@#Background.png  
BackgroundMode=3
BackgroundMargins=0,34,10,14


;  BLOCK NUMBER

 ;   wondering if I can avoid using this measure and setting the values directly into the meter.
[Measure_BlockNumber]
Measure=String
String=0
UpdateDivider=-1


[Meter_BlockNumberValue]
Meter=String
;MeasureName=Measure_BlockNumber    
Text=0