Hey I must be doing something wrong
Here's the measure I'm using:
Code: Select all
[CurrentIcon]
Measure=String
String=#IACT#
RegExpSubstitute=1
Substitute="mIndex(\d{1})":"\1"
DynamicVariables=1
And here's the hotkey measure:
Code: Select all
[Enter]
Measure=Plugin
Plugin=HotKey
HotKey=ENTER
KeyDownAction=[!SetVariable IACT "#CURRENTSECTION#"][!CommandMeasure "mIndex[CurrentIcon]" "Open"]
DynamicVariables=1
It works if I put [!CommandMeasure mIndex1 "Open"]. But if I tried it with all of the following and it didn't work:
KeyDownAction=[!CommandMeasure "[CurrentIcon]" "Open"]
KeyDownAction=[!CommandMeasure "mIndex[CurrentIcon]" "Open"]
KeyDownAction=[!CommandMeasure """mIndex[CurrentIcon]""" "Open"]
What am I supposed to do?
What I'm trying to do: enter opens the currently highlighted fileview icon through CommandMeasure. left and right keyboard arrows change the currently highlighted item. mouseover will also internally set the highlighted item to the one being hovered, but that's mostly for hotkey interactions.
The reason I'm trying to use formulas with these hotkey measures is so that I don't end up needing three hotkey measures for every single fileview item.
EDIT: nevermind, I found a way to resolve it. Your post made me realize I could reference a meter alongside a measure within quotes and Rainmeter will understand it as a meter.
The solution:
Code: Select all
[CurrentN]
Measure=Calc
Formula=1
UpdateDivider=-1
IfCondition=CurrentN < 1
IfTrueAction=[!SetOption CurrentN Formula "1"][!UpdateMeasure CurrentN]
[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]
[LeftKeyboard]
Measure=Plugin
Plugin=HotKey
HotKey=LEFT
KeyDownAction=[!HideMeter "btn[CurrentN]"][!EnableMeasure PressLeftCounter][!UpdateMeasure PressLeftCounter][!ShowMeter "btn[CurrentN]"][!Redraw]
[RightKeyboard]
Measure=Plugin
Plugin=HotKey
HotKey=RIGHT
KeyDownAction=[!HideMeter "btn[CurrentN]"][!EnableMeasure PressRightCounter][!UpdateMeasure PressRightCounter][!ShowMeter "btn[CurrentN]"][!Redraw]
[Enter]
Measure=Plugin
Plugin=HotKey
HotKey=ENTER
KeyDownAction=[!CommandMeasure "mIndex[CurrentN]" "Open"]
If anyone is interested or curious, btn1 btn2 btn3 etc are the highlight meters.
Now what I'm having trouble with is the following (and I believe it needs regExp):
I want MouseOverAction to make [CurrentN] the number of the current btn being hovered by the mouse.
Example: mouse hovers over btn5. It does a [!HideMeter "btn[CurrentN]"] and then makes [CurrentN] 5.
Mouse hovers over btn7. It does a [!HideMeter "btn[CurrentN]"] and then makes [CurrentN] 7.
What I tried doing was:
Code: Select all
[btnstyle]
MouseOverAction=[!HideMeter "btn[CurrentN]"][!SetVariable BTNORD #CURRENTSECTION#][!UpdateMeasure "CurrentNstring"][!SetOption CurrentN Formula "[CurrentNstring]"][!UpdateMeasure CurrentN]
[CurrentNstring]
Measure=String
String=#BTNORD#
RegExpSubstitute=1
Substitute="btn(\d{1})":"\1"
DynamicVariables=1
But it doesn't seem to work. What should I do?