I am trying to do this with an InputText box:
1- Update a $variable$ (works as intended).
2- Update a Webparser and its substrings.
3- Update the same variable again, with more detailed info this time, confirming the webparser did its job.
4- Update the meters associated once this is all done.
I am somehow stuck on step 1. The debug info says the ActionTimer gets called by the InputText box, but I don't see any updates going through.
Here's my (probably shoddy) code. I've tried a lot of things and I might have derailed a bit from the proper etiquette with Rainmeter. I have condensed the important stuff in a single excerpt for your viewing pleasure.
Thanks a lot and have a great "night". (I'm gonna go get some sleep)
Code: Select all
[Rainmeter]
Update=-1
DynamicVariables=1
Author=Zudzug
DisplayName=Test
Address=louvre, paris, france
LocationLat=45.689
LocationLong=-102.0445
lang=en
SettingsTextColor1=0,0,0
SettingsTextColor2=255,255,255
AddressURL=https://nominatim.openstreetmap.org/search/#Address#?format=json&limit=1&accept-language=#lang#
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeasureLocation]
Measure=WebParser
URL=#AddressURL#
RegExp=(?siU).*"lat":"(.*)","lon":"(.*)","display_name":"(.*)".*
FinishAction=[!Log "Address fetch finished." Debug]
Disabled=1
[MeasureLocationLatitude]
Group=Measures
Measure=WebParser
URL=[MeasureLocation]
StringIndex=1
[MeasureLocationLongitude]
Group=Measures
Measure=WebParser
URL=[MeasureLocation]
StringIndex=2
[MeasureLocationName]
Group=Measures
Measure=WebParser
URL=[MeasureLocation]
StringIndex=3
[MeasureUpdateCoordinates]
Measure=Plugin
Plugin=ActionTimer
ActionList=EnableGetLocation | Wait 500 | UpdateLocation Wait 1500 | SetAddress | SetLatitude | SetLongitude | UpdateLog
EnableGetLocation=[!EnableMeasure MeasureLocation]
UpdateLocation=[!UpdateMeasure MeasureLocation]
SetAddress=[!WriteKeyValue Variables Address "[&MeasureLocationName]" "#@#Variables.inc"][!UpdateMeter MeterAddressName][!Redraw][!Log "Address update finished." Debug]
SetLatitude=[!WriteKeyValue Variables LocationLat "[&MeasureLocationLatitude]" "#@#Variables.inc"][!UpdateMeter MeterLatCode][!Redraw][!Log "Latitude update finished." Debug]
SetLongitude=[!WriteKeyValue Variables LocationLong "[&MeasureLocationLongitude]" "#@#Variables.inc"][!UpdateMeter MeterLongCode][!Redraw][!Log "Longitude update finished." Debug]
UpdateLog=[!Log "Address, lat and lon updates finished." Debug]
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeterAddressName]
Meter=String
StringAlign=Center
FontFace=Segoe UI Light
FontColor=#SettingsTextColor1#
FontSize=12
X=516
Y=0r
W=400
Text=#Address#
ClipString=1
SolidColor=#SettingsTextColor2#,80
AntiAlias=1
ToolTipText=Type your real address and press the "Enter" key to Apply changes.
LeftMouseUpAction=[!PluginBang "MeterAddressInput ExecuteBatch 1"][!PluginBang "MeterAddressInput ExecuteBatch 2"]
;-------------------------------------------------------------
; This is the inputtext Plugin
;-------------------------------------------------------------
[MeterAddressInput]
Measure=Plugin
Plugin=InputText.dll
StringAlign=Center
FontFace=Segoe UI Light
FontSize=12
X=320
Y=130
W=800
H=56
AntiAlias=1
FocusDismiss=1
Command1=[!WriteKeyValue Variables Address "$UserInput$" "#@#Variables.inc"][!UpdateMeasure MeasureUpdateCoordinates][!Log "Updating variables." Debug]
DefaultValue="#Address#"