Wolfson wrote: ↑April 23rd, 2020, 7:45 am
Regarding the update speed:
Is the update of the meters itself depend on the rainmeter update? I thought it is decoupled based on using the HotKey that reacts to input and that then calls to update MeasureAlpha, the Meters and Redraws.
Normally. Generally speaking a skin is updated regularly (in most cases once a second - if the Update is set to the default
Update=1000, but in your case once per ten seconds, as eclectic-tech described) and on each update, the measures and meters are updated, then the skin is redrawn. Why in your case the "navigation" doesn't work properly is the update of different sections of your skin, as described below.
Wolfson wrote: ↑April 22nd, 2020, 9:16 pm
Only thing that does not work yet is the navigation, sometimes the arrow keys do what they are supposed to do, sometimes nothing or something else. My current code looks like this:
Note that beside eclectic-tech's solution, even if the Update is kept to 10,000, you can achieve a proper update if when you hit an arrow key, you update properly everything you have to update. You've updated only the [MeasureAlpha] measure and all meters, but you also have to update the HotKey plugin measures, because they are using the value of the
selected variable. When you hit a key, the value of the variable is changed, accordingly to the formula used into the !SetVariable bangs of the KeyUpAction option, but none of these measures don't know this, because they are not updated. Their update occurs only on next update cycle and because the Update is set to 10,000, this might take up to 10 seconds. Depending on when the update happens, the next keypress can or can't have the appropriate and desired result.
Simple solution: add the needed !UpdateMeasure bangs to the KeyUpAction options of all HotKey plugin measures. Beside this, you can remove both the !UpdateMeter and the !Redraw bangs, because the meters are updated into the IfTrueAction options of the [MeasureAlpha] measure. Taking all this into account the mentioned options should have the following forms:
Code: Select all
[MeasureHotKeyUp]
...
KeyUpAction=[!SetVariable selected (Clamp(#selected#-2,1,4))][!UpdateMeasure MeasureAlpha][!UpdateMeasure "MeasureHotKeyUp"][!UpdateMeasure "MeasureHotKeyDown"][!UpdateMeasure "MeasureHotKeyRight"][!UpdateMeasure "MeasureHotKeyLeft"]
...
[MeasureHotKeyDown]
...
KeyUpAction=[!SetVariable selected (Clamp(#selected#+2,1,4))][!UpdateMeasure MeasureAlpha][!UpdateMeasure "MeasureHotKeyUp"][!UpdateMeasure "MeasureHotKeyDown"][!UpdateMeasure "MeasureHotKeyRight"][!UpdateMeasure "MeasureHotKeyLeft"]
...
[MeasureHotKeyRight]
...
KeyUpAction=[!SetVariable selected (Clamp(#selected#+1,1,4))][!UpdateMeasure MeasureAlpha][!UpdateMeasure "MeasureHotKeyUp"][!UpdateMeasure "MeasureHotKeyDown"][!UpdateMeasure "MeasureHotKeyRight"][!UpdateMeasure "MeasureHotKeyLeft"]
...
[MeasureHotKeyLeft]
...
KeyUpAction=[!SetVariable selected (Clamp(#selected#-1,1,4))][!UpdateMeasure MeasureAlpha][!UpdateMeasure "MeasureHotKeyUp"][!UpdateMeasure "MeasureHotKeyDown"][!UpdateMeasure "MeasureHotKeyRight"][!UpdateMeasure "MeasureHotKeyLeft"]
...
Now my opinion about the Update issue: in case of skins entirely controlled by mouse (or in your case by the remote control), I tend to set the Update to
Update=-1, which prevents the skin from being updated. This might have a great impact on resources usage, but it might have has a great disadvantage if you don't pay enough attention to the details: on every change (keypress, clicks or even mouse movements, depending on the code) you have to update the appropriate measures and meters. An alternative solution might be to update the entire skin, through
!Update bangs (if you do this don't use the
!Redraw bang as well, because when an update occurs, a redraw is automatically made, so no need to redraw the skin with the
!Redraw bang), but in this case the whole process loses it meaning because if you update the whole skin, instead of just the appropriate measures and meters, you didn't do too much.