balala wrote: ↑December 13th, 2019, 2:04 pm
First add a
DynamicVariables=1 option to the above measure, because if the variables are set dynamically (through some !SetVariable bangs) you can't use them, unless you're making the above setting.
No bueno, still keeps queueing several mousescroll inputs when they should just stop when reaching the limit.
I even tried adding a SetOption but it doesn't seem to work
Code: Select all
[StopMover]
Measure=Calc
Formula=(#ATX#)
IfCondition=StopMover < 2
IfTrueAction=[!CommandMeasure MeasureMover "Stop 1"][!SetOption Rainmeter mousescrollupAction ""][!Update][!Redraw]
IfCondition2=StopMover > #Limit2#
IfTrueAction2=[!CommandMeasure MeasureMover "Stop 2"][!SetOption Rainmeter mousescrolldownAction ""][!Update][!Redraw]
DynamicVariables=1
balala wrote: ↑December 13th, 2019, 2:04 pmNormally. Mathematical formulas are working ONLY with numbers. The above things can be set through !SetOption bangs. This way it never will work.
Well, I have these three Calcs. You can see that CurrentN has an IfCondition and those are in place to work with left and right key inputs. These, on the contrary of the mousescroll inputs, correctly stop being registered after reaching the limit.
Code: Select all
[CurrentN]
Measure=Calc
Formula=1
UpdateDivider=-1
IfCondition=CurrentN < 1
IfTrueAction=[!CommandMeasure MeasureMover "Stop 7"][!SetOption CurrentN Formula "1"][!CommandMeasure LeftKeyboard Stop][!DisableMeasureGroup GamepadLeft][!UpdateMeasure CurrentN]
IfCondition2=CurrentN > #NumberOfItems#
IfTrueAction2=[!CommandMeasure MeasureMover "Stop 8"][!SetOption CurrentN Formula #NumberOfItems#][!CommandMeasure RightKeyboard Stop][!DisableMeasureGroup GamepadRight][!UpdateMeasure CurrentN]
DynamicVariables=1
[PressLeftCounter]
Measure=Calc
Formula=PressLeftCounter + 1
Disabled=1
UpdateDivider=-1
OnUpdateAction=[!SetOption CurrentN Formula "([CurrentN] - 1)"][!UpdateMeasure CurrentN][!Redraw]
[PressRightCounter]
Measure=Calc
Formula=PressRightCounter + 1
Disabled=1
UpdateDivider=-1
OnUpdateAction=[!SetOption CurrentN Formula "([CurrentN] + 1)"][!UpdateMeasure CurrentN][!Redraw]
Now, on the second issue, regarding Execute 7 and 8, I had the following idea:
You can see that the KeyDownActions are quite extensive:
Code: Select all
[LeftKeyboard]
Measure=Plugin
Plugin=HotKey
HotKey=LEFT
KeyDownAction=[!HideMeter "btn[CurrentN]"][!EnableMeasure PressLeftCounter][!UpdateMeasure PressLeftCounter][!ShowMeter "btn[CurrentN]"][!CommandMeasure MeasureMover "Execute 8"][!CommandMeasure RightKeyboard Start][!EnableMeasureGroup GamepadRight][!Redraw]
DynamicVariables=1
[RightKeyboard]
Measure=Plugin
Plugin=HotKey
HotKey=RIGHT
KeyDownAction=[!HideMeter "btn[CurrentN]"][!EnableMeasure PressRightCounter][!UpdateMeasure PressRightCounter][!ShowMeter "btn[CurrentN]"][!CommandMeasure MeasureMover "Execute 7"][!CommandMeasure LeftKeyboard Start][!EnableMeasureGroup GamepadLeft][!Redraw]
DynamicVariables=1
Since I only want Execute 7 and Execute 8 to register within specific CurrentN value ranges, is it possible for me to have a Measure that controls this?
In other words, instead of putting a !commandmeasure measuremover within those two keydownactions, I put a !CommandMeasure ControlMeasure (Activate???Execute???) with IfCondition and IfTrueAction.
IfCondition=CurrentN > 4
IfTrueAction=[!CommandMeasure MeasureMover "Execute 8"]
Is this possible? Would that work? How do I do it?