Update measure within a command batch
Posted: April 20th, 2017, 6:24 pm
Yop.
Here's the "bug" I met: I created a File Explorer skin, using mostly Fileview plugin, as well as Webparser. At some point, I'm using a measure to find a path in another file, to set the new path on the current skin. But I can't do it all within a single command.
More clear with the code, I think (I removed anything unrelated with the bug, it won't work like this of course. To test it, it is featured there, as Explorer 2 skin):
Here, it works: the scroll down updates the necessary values, and the scroll up writes the new value. But if I try to do the whole thing within a single command, it does not work, because (I guess, I haven't looked into the source code 'cause C++ scares me) the whole batch of command is already prepared before the measures update, so the command, even after the measures update, still uses the former value. So, is there a workaround? So I can do something like
Here's the "bug" I met: I created a File Explorer skin, using mostly Fileview plugin, as well as Webparser. At some point, I'm using a measure to find a path in another file, to set the new path on the current skin. But I can't do it all within a single command.
More clear with the code, I think (I removed anything unrelated with the bug, it won't work like this of course. To test it, it is featured there, as Explorer 2 skin):
Code: Select all
[MeasurePath]
Measure=Plugin
Plugin=FileView
FinishAction=[!WriteKeyValue #CURRENTSECTION# Path "[MeasurePath]"][!Update]
[MeasureExplorer1Path]
Measure=Plugin
Plugin=WebParser
URL="file://#ROOTCONFIGPATH#Explorer 1\Explorer 1.ini"
[MeasureExplorer1PathChild]
Measure=Plugin
Plugin=WebParser
URL=[MeasureExplorer1Path]
StringIndex=1
[MeterTitle]
Meter=STRING
MouseScrollUpAction=[!WriteKeyValue MeasurePath Path "[MeasureExplorer1PathChild]"][!Refresh]
MouseScrollDownAction=[!CommandMeasure MeasureExplorer1Path Update][[!CommandMeasure MeasureExplorer1PathChild Update]]
Code: Select all
MouseScrollUpAction=[!CommandMeasure MeasureExplorer1Path Update][[!CommandMeasure MeasureExplorer1PathChild Update]][!WriteKeyValue MeasurePath Path "[MeasureExplorer1PathChild]"][!Refresh]