WebParser measures need to be "commanded" to update (which unfortunately means polling the site again in some cases) in order to use dynamic variables in their options, like mentioned here. In the case you are talking about it's not a big issue, however, since I suppose you don't change the latitude and longitude every second. So, in order to do what you want, you'd have to probably use something like [!CommandMeasure @EntireSiteSuperParent "Update"] instead of [!UpdateMeasure @EntireSiteSuperParent] after setting the latitude and longitude variables to the new values.JamX wrote: ↑June 24th, 2020, 2:58 pm BTW, is there a possibility to add a custon menu when right click on the skin where 2 or more locations are listed which you can select.
After the selection the latitude and longitude should be used for the weather_twc skin
I think you can use something like:
Is this the way to accomplish this?Code: Select all
ContextTitle="--Locations--" ContextAction=[] ContextTitle2="Landgraaf" ContextAction2=[!Setvariable Latitude 50.8871][!Setvariable Longitude 6.0116] ContextTitle3="Brouwersdam" ContextAction3=[!Setvariable Latitude 51.7563][!Setvariable Longitude 3.8402]
And what do I miss?
I see the variables Latitude and Longitude change when I select one or the other.
The variable URLSite does not change it's sting to the new Latitude and Longitude set variables
The I used this:But still the variable URLSite does not changeCode: Select all
ContextTitle="--Locations--" ContextAction=[] ContextTitle2="Landgraaf" ContextAction2=[!Setvariable Latitude 50.8871][!Setvariable Longitude 6.0116][!Setvariable URLSite "https://weather.com/#Language#/weather/today/l/#Latitude#,#Longitude#"][!UpdateMeasure @EntireSiteSuperParent][!Redraw] ContextTitle3="Brouwersdam" ContextAction3=[!Setvariable Latitude 51.7563][!Setvariable Longitude 3.8402][!Setvariable URLSite "https://weather.com/#Language#/weather/today/l/#Latitude#,#Longitude#"][!UpdateMeasure @EntireSiteSuperParent][!Redraw]
It is currently April 26th, 2024, 2:21 pm
Animated GIF issue
-
- Rainmeter Sage
- Posts: 7171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF issue
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
Do you also have an idea why the variable :
URLSite = "https://weather.com/#Language#/weather/today/l/#Latitude#,#Longitude#"
is not updated while the Latitude and Longitude variables are updated?
This does not work:
ContextAction2=[!Setvariable Latitude 50.8871][!Setvariable Longitude 6.0116][!Setvariable URLSite "https://weather.com/#Language#/weather/today/l/#Latitude#,#Longitude#"][!Commandmeasure @EntireSiteSuperParent "Update"]
This does work:
ContextAction2=[!Setvariable URLSite "https://weather.com/#Language#/weather/today/l/50.8871,6.0116"][!Commandmeasure @EntireSiteSuperParent "Update"]
URLSite = "https://weather.com/#Language#/weather/today/l/#Latitude#,#Longitude#"
is not updated while the Latitude and Longitude variables are updated?
This does not work:
ContextAction2=[!Setvariable Latitude 50.8871][!Setvariable Longitude 6.0116][!Setvariable URLSite "https://weather.com/#Language#/weather/today/l/#Latitude#,#Longitude#"][!Commandmeasure @EntireSiteSuperParent "Update"]
This does work:
ContextAction2=[!Setvariable URLSite "https://weather.com/#Language#/weather/today/l/50.8871,6.0116"][!Commandmeasure @EntireSiteSuperParent "Update"]
-
- Rainmeter Sage
- Posts: 7171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF issue
That's a quirk in how Rainmeter operates (probably logical from a programing point of view, but obviously not that nice for a skin developer) where the variables are updated to the new values only after "exiting" the option where they were set to those values. So:JamX wrote: ↑June 24th, 2020, 5:20 pm Do you also have an idea why the variable :
URLSite = "https://weather.com/#Language#/weather/today/l/#Latitude#,#Longitude#"
is not updated while the Latitude and Longitude variables are updated?
Code: Select all
[!Setvariable Latitude 51.7563][!Setvariable Longitude 3.8402][!Setvariable URLSite "https://weather.com/#Language#/weather/today/l/#Latitude#,#Longitude#"]
Possible solutions:
- move the latter bang to another place/option/measure in the code
- create a measure doing the URLSite variable change in a basic IfCondition and update it (this will work in the same option, by the way)
- decide on whether the URLsite variable update is really necessary, because if you don't do anything else with it and just use it in the WebParser parent's URL option, simply setting the latitude and longitude followed by command updating the WebParser parent will be enough from a functional point of view
- use measures instead of variables, as those can be updated "on demand" within the same option
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
This does not workYincognito wrote: ↑June 24th, 2020, 5:40 pm
Possible solutions:
- move the latter bang to another place/option/measure in the code
- create a measure doing the URLSite variable change in a basic IfCondition and update it (this will work in the same option, by the way)
- decide on whether the URLsite variable update is really necessary, because if you don't do anything else with it and just use it in the WebParser parent's URL option, simply setting the latitude and longitude followed by command updating the WebParser parent will be enough from a functional point of view
- use measures instead of variables, as those can be updated "on demand" within the same option
ContextAction3=[!Setvariable Latitude 50.8871][!Setvariable Longitude 6.0116][!Commandmeasure @EntireSiteSuperParent "Update"]
because the URLSite is not updated.
What i have used and works is:
ContextAction2=[!Setvariable URLSite "https://weather.com/#Language#/weather/today/l/50.8871,6.0116"][!Commandmeasure @EntireSiteSuperParent "Update"]
Directly added the Lat and Long into the URLSite variable
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
Now you see " custom skin actions"
I would like to change that into "Select Location"
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 7171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF issue
Yeah, that's probably because the @EntireSiteSuperParent measure is using the #URLSite# variable, without a direct reference to latitude and longitude. That explains why setting the URLSite variable instead works.
Sorry, not an expert in jsmorley's .inc files, as I use a different approach, where, among other differences, I directly reference the "location code" (aka the latitude and longitude, in the current format) in the URL option instead:
Code: Select all
Url=https://#WeatherSite#/#WeatherLanguage#/weather/#WeatherForecastDays#/l/#WeatherLocationCode#?units=#WeatherUnits#
-
- Developer
- Posts: 22630
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Animated GIF issue
You can do something like this:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
RightMouseUpAction=[!SkinCustomMenu]
ContextTitle=Select Location
ContextAction=[!Log "Put action here"]
ContextTitle2=---
ContextAction2=[]
ContextTitle3=Main Context Menu
ContextAction3=[!SkinMenu]
You do not have the required permissions to view the files attached to this post.
-
- Posts: 207
- Joined: October 4th, 2019, 2:46 pm
Re: Animated GIF issue
Perfect.
I used MiddleMouseUpAction for it.
Thanks.
It looks now like this:
I used MiddleMouseUpAction for it.
Thanks.
It looks now like this:
You do not have the required permissions to view the files attached to this post.
Last edited by JamX on June 24th, 2020, 6:16 pm, edited 1 time in total.
-
- Rainmeter Sage
- Posts: 7171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF issue
Yep, jsmorley was faster on this one. I was going to say just about the same thing.
-
- Developer
- Posts: 22630
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Animated GIF issue
Yeah, I'm that guy that sticks his nose in a thread to pick off some low hanging fruit, then disappears again when it's a tough question...Yincognito wrote: ↑June 24th, 2020, 6:15 pm Yep, jsmorley was faster on this one. I was going to say just about the same thing.