It is currently April 27th, 2024, 7:42 pm

App Launcher for access with remote control

General topics related to Rainmeter.
User avatar
balala
Rainmeter Sage
Posts: 16179
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: App Launcher for access with remote control

Post by balala »

Wolfson wrote: April 26th, 2020, 9:02 pm Here is the code:
A few observations related to the posted code:
  • Since you set a DefaultUpdateDivider=-1 option into the [Rainmeter] section, there is not needed to set the UpdateDivider=-1 on some measures (the HotKey plugine measures: [MeasureHotKeyUp], [MeasureHotKeyDown], [MeasureHotKeyRight], [MeasureHotKeyLeft]) and meters ([Background]). Doesn't create problems if you do, but it's practically useless.
  • There is no need to introduce and use the proc1run, proc2run and proc3run variables. Although doesn't hurt to use them, it can be avoided and usually the less variables (measure or whatever), the better. If you wanna give it a try, here is how can you do this:
    • Remove the above three variables from the [Variables] section.
    • Remove the IfAboveValue, IfAboveAction, IfBelowValue and IfBelowAction options of the [MeasureProcessPluginProc1], [MeasureProcessPluginProc2], [MeasureProcessPluginProc3] and [MeasureProcessPluginProc4] measures.
    • Replace the IfCondition and IfCondition2 options of the [MeasureCheckProcess] measure with the following ones:

      Code: Select all

      [MeasureCheckProcess]
      ...
      IfCondition=(Clamp(MeasureProcessPluginProc1,0,1)=1) || (Clamp(MeasureProcessPluginProc2,0,1)=1) || (Clamp(MeasureProcessPluginProc1,0,1)=1)
      ...
      IfCondition2=(Clamp(MeasureProcessPluginProc1,0,1)=0) && (Clamp(MeasureProcessPluginProc1,0,1)=0) && (Clamp(MeasureProcessPluginProc1,0,1)=0)
      ...
    The above solution lets you to remove the DynamicVariables=1 option from the same [MeasureCheckProcess] measure as well.
  • The !RedrawGroup bang is mistakenly used into the IfTrueAction option of the [Measurealpha] measure. The mistake, presumably made by many users is that you can't redraw just one meter or a group of meters. The whole skin has to be and is redrawn, when it is. !RedrawGroup redraws all skins belonging to the specified group. You posted the following form of this bang into the mentioned option: [!RedrawGroup MeterImage]. But in your code MeterImage is a group of meters, containing the [MeterImage1] - [MeterImage4] meters. As such you can't redraw them. So, replace the [!RedrawGroup MeterImage] bang (as said into the IfTrueActrion option of the [Measurealpha] measure) with [!Redraw]. This will reduce the responding time of the skin when you hit an arrow key on your keyboard (or the remote control, if I'm not wrong), because a small delay was still present. This was caused by the fact that although the appropriate meters have been updated, the skin wasn't redrawn. Now this I hope is fixed as well.
  • And one more: the common options of more meters can be grouped into a "style" section, used on all those meters which have to use that style. This way you can avoid to write / paste all those options one by one on each meter. For instance create an [ImageStyle] section into your code, as it follows:

    Code: Select all

    [ImageStyle]
    DynamicVariables=1
    Group=MeterImage
    AntiAlias=1
    W=([Background:W]*0.5)
    H=([Background:H]*0.5)
    Now replace all these options on all of the four meters ([MeterImage1] - [MeterImage4]) with one single MeterStyle=ImageStyle option.