The !Refresh is my mistake, I should have removed it from the code I posted, it is actually used for irrelevant parts of the skin, but the problem appeared before I used it. (Same thing for the !Update)
I tried both !SetVariable and !SetOption, but the problems remains. I'm not sure this might be a "slow update" problem, because the double scroll (up down) technique works in less time than the update is set to (even works with Update=-1)
To me, the problem is that I can't find out a way to automate several commands with updates between them, or force an update of the measure BEFORE next commands start. Only way I can think of would be starting a timer and executing the following batch of command after some time (enough to be sure the webparser measure has updated. It comes from a local file, so it's almost instantaneous anyway)
Here is a functional version of the skin to get a better picture. (I removed some features, comments or used-once-only variables 'cause it's very long, and added the necessary variables from other files, thus there might be useless remaining parts, but it works on its own.)
(I also edited the URL from MeasureExplorer1Path if there needs to test, so it can be tested from the same directory.)
(I removed the update of the child measure, since it's useless)
Code: Select all
[Rainmeter]
BackgroundMode=2
SolidColor=#Click#
OnRefreshAction=[#RefreshPathExplorer#][#RefreshInputDefaultValue#][!Update]
[Metadata]
Name=Explorer 2
Author=Bananorpion
Information=Dynamic skin. Displays as text the current path, and the first eight items of the directory. Mouse left click on the title: opens the current directory in the file explorer. Mouse right click on the title: reloads the skin. Mouse left click on an item: updates path if the item is a directory, opens via default explorer command if the item is a file. Mouse right click on an item: opens default explorer context menu. Mouse scroll up/down on the item list: goes one up/down in the current directory file index. Mouse scroll left/right on the item list: goes eight up/down in the current directory file index. Mouse left click on the path: opens an input box to select a new path. Mouse scroll up, then down on the title: copies and pastes the path from the skin Explorer 1 in place of the path from the current skin.
Version=1.0
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
[Variables]
IconsPath=#@#Icons\Explorer 2\
;;;;;;;;;;;;; to be removed
RefreshPathExplorer=!SetOption Title LeftMouseUpAction """explorer.exe "[MeasurePath]"""
RefreshInputDefaultValue=!SetOption MeasureInput DefaultValue "[MeasurePath]"
InputFontSize=11
FontSize16M=16
FontSize11M=11
MainFont=Consolas
ExplorerFont=Consolas
Click=0,0,0,1
White=255,255,255,255
BaseBlack=0,0,0
Black=#BaseBlack#,255
BlackA200=#BaseBlack#,200
GoldenLight=248,218,118,255
;;;;;;;;;;;;; to be removed
[MeasurePath]
Measure=Plugin
Plugin=FileView
Path=C:\
FinishAction=[!WriteKeyValue #CURRENTSECTION# Path "[MeasurePath]"][#RefreshPathExplorer#][#RefreshInputDefaultValue#][!Update]
[MeasureInput]
Measure=Plugin
Plugin=InputText
X=[Path:X]
Y=[Path:Y]
H=50
W=450
FontFace=#InputFont#
FontSize=#InputFontSize#
ClipString=1
SolidColor=#BlackA200#
FontColor=#GoldenLight#
Command1=[!WriteKeyValue MeasurePath Path "$UserInput$"][#RefreshPathExplorer#][#RefreshInputDefaultValue#][!Refresh]
[MeasureExplorer1Path]
Measure=Plugin
Plugin=WebParser
;URL="file://#ROOTCONFIGPATH#Explorer 1\Explorer 1.ini"
URL="file://#CURRENTPATH#test"
RegExp=[^s]Path=(.*)
CodePage=1252
ForceReload=1
[MeasureExplorer1PathChild]
Measure=Plugin
Plugin=WebParser
URL=[MeasureExplorer1Path]
StringIndex=1
RegExpSubstitute=1
Substitute="\r":""
[Title]
Meter=STRING
MeterStyle=TitleMeter
FontColor=#White#
FontFace=#MainFont#
FontSize=#FontSize16M#
StringStyle=Bold
AntiAlias=1
Text="Explorer"
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor #Black#][!SetOption #CURRENTSECTION# FontColor #GoldenLight#][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor #Click#][!SetOption #CURRENTSECTION# FontColor #White#][!UpdateMeter #CURRENTSECTION#][!Redraw]
RightMouseUpAction=[!Refresh]
;;; problem is down here
MouseScrollUpAction=[!WriteKeyValue MeasurePath Path "[MeasureExplorer1PathChild]"][!Refresh]
MouseScrollDownAction=[!CommandMeasure MeasureExplorer1Path Update]
;;; problem is up here
UpdateDivider=-1
[Path]
Meter=STRING
MeterStyle=PathMeter
MeasureName=MeasurePath
X=0R
Y=0
H=50
W=460
FontFace=#ExplorerFont#
FontSize=#FontSize11M#
FontColor=#GoldenLight#
ClipString=1
AntiAlias=1
LeftMouseUpAction=[!CommandMeasure "MeasureInput" "ExecuteBatch 1"]
UpdateDivider=-1