mak_kawa wrote: ↑February 22nd, 2020, 9:29 pm
So my "desperate" workaround is... Change
Update=1000 to
Update=500 and add
DefaultUpdateDivider=2 in [Rainmeter] section. And also add
UpdateDivider=1 to [measureHotKey] measure.
By this change, whole skin is updated every 500*2=1000 ms (1 seocnd), but only [measureHotKey] measure is updated (and recieve hot key action) every 500 ms (0.5 second).
In my test of this setting, almost no "key press not registered" issue is noticeable.
Although reducing the Update to 500 makes the skin to properly work, I'd propose to keep the Update to the default 1000 (but see one more below) and update the HotKey plugin measure when you hit the appropriate key on the keyboard. I'm not sure why do you say that "There seems to be no trigger for instant updating of the HotKey measure", because it can be simply updated through an !UpdateMeasure bangs. Just tried and it works perfectly.
If anyone wants to try out what am I talking about, try to add such a bang to the KeyUpAction option of the [measureHotKey] measure. With it, the option looks like this:
KeyUpAction=[!SetVariable Num "((#Num#+1)%4)"][!UpdateMeasure "#CURRENTSECTION#"][!UpdateMeasure "MeasureImage"][!UpdateMeter "meterArrow"][!UpdateMeter meterNum][!Redraw] (note that the first !SetVariable bang of the above option is modified as I described in my previous reply).
And finally what I said about the Update value of the skin. For entirely mouse or keyboard controlled skins, like this one (assuming this is the entire code), an even better possibility is to make it not to update at all. For this you can set the Update to
Update=-1. If you do this, you have to take care to always update the appropriate measures and meters and redraw the skin manually whenever something is changing. For this you have to use more (a lot of...) !UpdateMeasure / !UpdateMeter, along with !Redraw bangs. But it's not impossible at all. I suppose many people don1t agree with me in this, but for skins which don't require a regular update, being, as said, entirely mouse / keyboard controlled, it's a better approach.
For instance this code, using the Update=-1, look like this:
Code: Select all
[Rainmeter]
Update=-1
[Variables]
Num=0
[measureHotKey]
Measure=Plugin
Plugin=HotKey
HotKey=UP
;Shift 0
KeyUpAction=[!SetVariable Num "((#Num#+1)%4)"][!UpdateMeasure "#CURRENTSECTION#"][!UpdateMeasure "MeasureImage"][!UpdateMeter "meterArrow"][!UpdateMeter meterNum][!Redraw]
DynamicVariables=1
[MeasureImage]
Measure=Calc
Formula=#Num#
RegExpSubstitute=1
Substitute="^(.*)$":"D:\Images\\1.png"
DynamicVariables=1
[meterArrow]
Meter=Image
MeasureName=MeasureImage
X=5
Y=5
W=15
H=15
[meterNum]
Meter=String
FontSize=7
FontColor=0,0,255,192
StringStyle=Bold
X=22
Y=17
Text=#Num#
DynamicVariables=1
If you wanna give it a try, check the path used into the Substitute option of the [MeasureImage] measure.