Innocent_Zero wrote: ↑May 8th, 2022, 2:13 pm
However there is no LeftMouseUpAction in both and the MeasureInput is also not updating. I thought I had escaped all the variables but I cannot find where I'm going wrong.
All this is caused by the missing quotes. Even if in many cases the quotes are not mandatory, in some cases they are. For instance dividing the ContexAction option into bangs (to see them better) these are your bangs:
- [!WriteKeyValue Header[MeasureHeaderCount] Meter Image]
- [!WriteKeyValue Header[MeasureHeaderCount] X 0r]
- [!WriteKeyValue Header[MeasureHeaderCount] Y 5R]
- [!WriteKeyValue Header[MeasureHeaderCount] SolidColor #*color1*#]
- [!WriteKeyValue Header[MeasureHeaderCount] W "#*Width*#"]
- [!WriteKeyValue Header[MeasureHeaderCount] H 10]
- [!WriteKeyValue Header[MeasureHeaderCount] LeftMouseUpAction "[!WriteKeyValue Header1 SolidColor [*MeasureHighlightColor*]][!WriteKeyValue MeasureColor Formula ([*MeasureColor*]+1) \"#@#Measures.inc\"][!UpdateMeasure [*MeasureHighlightColor*]][!Refresh]"]
- [!WriteKeyValue Meter[MeasureHeaderCount] Meter String]
- [!WriteKeyValue Meter[MeasureHeaderCount] MeterStyle StyleText]
- [!WriteKeyValue Meter[MeasureHeaderCount] X 0r]
- [!WriteKeyValue Meter[MeasureHeaderCount] Y 0R]
- [!WriteKeyValue Meter[MeasureHeaderCount] Text "Fillthis"]
- [!WriteKeyValue Meter[MeasureHeaderCount] LeftMouseUpAction "[!CommandMeasure MeasureInput "ExecuteBatch [MeasureHeaderCount]"]"]
- [!WriteKeyValue MeasureInput Command[MeasureHeaderCount] "[!WriteKeyValue Meter[MeasureHeaderCount] Text \"$UserInput$\"]"]
- [!WriteKeyValue MeasureHeaders Formula [[*MeasureHeaders*]+1)]]
- [!Update]
- [!Redraw]
- [!Delay 16]
- [!Refresh]
Having these bangs this way it's easier to see what's the problem:
- In the 7. !WriteKeyValue you're quoting what the LeftMouseUpActioln option should set, however you're using quotations into this expression as well. This confuses Rainmeter. This is why the Magic Quotes has been introduced: to can quote something which itself contains quotes. With this the option will look this way: [!WriteKeyValue Header[MeasureHeaderCount] LeftMouseUpAction """[!WriteKeyValue Header1 SolidColor [*MeasureHighlightColor*]][!WriteKeyValue MeasureColor Formula ([*MeasureColor*]+1) \"#@#Measures.inc\"][!UpdateMeasure [*MeasureHighlightColor*]][!Refresh]"""]. This way Rainmeter knows where the quotation is beginning and where it ends. The "simple" quotes are the let's say "included" quotes, the triple quotes (the magic quotes) delimite what should be set with the bang.
- Same thing for bang no 13: [!WriteKeyValue Meter[MeasureHeaderCount] LeftMouseUpAction """[!CommandMeasure MeasureInput "ExecuteBatch [MeasureHeaderCount]"]"""]
- And for bang 14: [!WriteKeyValue MeasureInput Command[MeasureHeaderCount] """[!WriteKeyValue Meter[MeasureHeaderCount] Text \"$UserInput$\"]"""]
Above this I recommend to get used to always use the quotes. For instance instead of the first bang (
[!WriteKeyValue Header[MeasureHeaderCount] Meter Image]), I'd use
[!WriteKeyValue Header[MeasureHeaderCount] Meter "Image"]. Even if these quotes are not mandatory at all,
is a good idea to get used to use them in any condition. Doesn't hurt, however can save you a lot of headaches.
Additional tip: if you refresh the skin (last
[!Refresh] bang), it's completely useless to update it before (with the
[!Update] bang). And even if you want to do such an update, if you added the
[!Update] bang, a
[!Redraw] is again useless. When the skin is updated (doesn't matter if it is in the normal update cycle, controlled by the Update option of the [Rainmeter] section, or by an
[!Update] bang), a redraw is made as well. Duplicating this operation doesn't worth, because the redraw is quite expensive operation, loading uselessly the CPU. That's why I recommend to remove the
[!Update], the
[!Redraw] and the
[!Delay 16] bangs.