Hopefully someone can point me in the right direction. I have a weather skin that contains a radar gif in a meter. When I hover over the meter, it activates (opens) another skin that uses WebView to open an html page that displays the actual weather radar. All of that is working perfectly. What I would like to do is have the radar skin deactivate (hide) when the mouse leaves the skin. I haven't been able to find a solution because the WebView seems to override any meters and the mouse actions don't seem to work from the html page that WebView opens.
Any suggestions would be greatly appreciated.
It is currently November 4th, 2024, 4:19 am
Deactivating Skins
-
- Posts: 19
- Joined: May 24th, 2023, 3:11 pm
-
- Rainmeter Sage
- Posts: 16699
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Deactivating Skins
Deactivating and hiding a skin are two completely different things. Deactivating it means closing it. Hiding means the skin remains open and running, but gone not-visible. In such a case all measure are working in background, the skin is normally updated. What would you like: to hide or to deactivate the skin? I assume you want to deactivate the skin, if you're activating it when you're hovering the mouse over the appropriate meter, but am I right?
In any case, you have to add a MouseLeaveAction option to the same section to which you've added the MouseOverAction option as well. MouseOverAction is executed when you're hovering the mouse over that meter / skin, while MouseLeaveAction is executed when you're leaving the meter / skin. The option which has to be added is most probably looking this way: MouseLeaveAction=[!DeactivateConfig "Config-Name"]. To can use this option, you have to add the appropriate config name as the Config-Name parameter. What the config name is, I don't know, because your question is extremely vague.
For further help, please give us a few details. For instance what do you mean by "WebView"? What is the element you want to use to activate / deactivate the other skin? And so on...
-
- Posts: 19
- Joined: May 24th, 2023, 3:11 pm
Re: Deactivating Skins
Sorry I didn't make myself clear. When I hover over the radar gif in the weather skin it will activate a different skin that shows the actual weather radar. I want that skin to stay active until I leave the radar skin that was just activated, at which time the radar skin deactivates.
The WebView is a plugin that lets you view a webpage. In my case it only uses a plugin measure and the html page that it calls. My understanding is that there are no mouse actions on measures and this WebView measure seems to cover up any meter I want to add to use the MouseLeaveAction.
Hopefully this makes more sense.
The WebView is a plugin that lets you view a webpage. In my case it only uses a plugin measure and the html page that it calls. My understanding is that there are no mouse actions on measures and this WebView measure seems to cover up any meter I want to add to use the MouseLeaveAction.
Hopefully this makes more sense.
-
- Rainmeter Sage
- Posts: 16699
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Deactivating Skins
Still not entirely clear. So let's clear things up.RogerDodger wrote: ↑May 24th, 2023, 6:40 pm Sorry I didn't make myself clear. When I hover over the radar gif in the weather skin it will activate a different skin that shows the actual weather radar. I want that skin to stay active until I leave the radar skin that was just activated, at which time the radar skin deactivates.
Let's say your "main" skin (the weather skin) is called Weather. Also let's say the skin showing the actual weather radar is called Radar. So what did I understand from your description is this: you want to activate Radar skin when you're hovering the mouse over the Weather skin (or over some meter of this skin? - not sure what you mean by "radar gif"). The deactivation of the Radar skin will go on when you're leaving the Radar skin. Is this correct?
If you can't get this working, check this one as well:
Alright, based on this, I realized in meantime what WebView is. If that plugin measure overrides any mouse action, it's quite weird. But we'd need an example, so please pack the whole config containing both skins and upload the package here, to can check.RogerDodger wrote: ↑May 24th, 2023, 6:40 pm The WebView is a plugin that lets you view a webpage. In my case it only uses a plugin measure and the html page that it calls. My understanding is that there are no mouse actions on measures and this WebView measure seems to cover up any meter I want to add to use the MouseLeaveAction.
-
- Posts: 19
- Joined: May 24th, 2023, 3:11 pm
Re: Deactivating Skins
Do you want the entire working skins because there are a number of files and some are rather large?
-
- Rainmeter Sage
- Posts: 16699
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Deactivating Skins
Would be useful. Otherwise don't really know how to check what and how are overridden the mouse actions. How large is the package?RogerDodger wrote: ↑May 24th, 2023, 8:15 pm Do you want the entire working skins because there are a number of files and some are rather large?
-
- Rainmeter Sage
- Posts: 2754
- Joined: March 23rd, 2015, 5:26 pm
Re: Deactivating Skins
What about if you put a nearly transparent image meter (SolidColor=0,0,0,1) directly on top of the entire radar view skin? You'd set a MouseLeaveAction option on that transparent meter to deactivate it.RogerDodger wrote: ↑May 24th, 2023, 3:30 pm Hopefully someone can point me in the right direction. I have a weather skin that contains a radar gif in a meter. When I hover over the meter, it activates (opens) another skin that uses WebView to open an html page that displays the actual weather radar. All of that is working perfectly. What I would like to do is have the radar skin deactivate (hide) when the mouse leaves the skin. I haven't been able to find a solution because the WebView seems to override any meters and the mouse actions don't seem to work from the html page that WebView opens.
Any suggestions would be greatly appreciated.
-
- Rainmeter Sage
- Posts: 8597
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Deactivating Skins
If you want to deactivate the WebView powered radar skin when the mouse leaves it, you have a couple of possibilities:RogerDodger wrote: ↑May 24th, 2023, 3:30 pmWhen I hover over the meter, it activates (opens) another skin that uses WebView to open an html page that displays the actual weather radar. All of that is working perfectly. What I would like to do is have the radar skin deactivate (hide) when the mouse leaves the skin. I haven't been able to find a solution because the WebView seems to override any meters and the mouse actions don't seem to work from the html page that WebView opens.
- make the WebView "measure" smaller via its X/Y/W/H in order to leave a "margin" that isn't covered by the webpage, and that your skin can react to using the usual mouse actions; this won't be perfect, of course, because the center of the skin will still be covered, but it can help nevertheless
- normally, you could execute various Rainmeter bangs from the webpage as well, by creating the proper event listeners in the page (HTML or Javascript, it doesn't matter), like explained here or by looking at how I did in in my ...\@Resources\Index.js from my Earth skin (search for "function atSkinPointerMove(e)" in the file). The problem in your case is that the webpage is external and you have no control over it, in order to add the necessary code. Even so, in theory you could make it work if you use a local webpage you create (must create a local server, run it on localhost and all that crap because of the web security hysteria nowadays, but anyway) and then maybe add the external webpage in a frame or something similar (of course, these are too deprecated in HTML5 because of the same hysteria)
Bottom line, the issue resides in the fact that the page is not under your control. Alternatively, you could change the deactivation system a bit and make it react on some suited combination of mouse actions from your main skin (the one that activates the WebView skin on hover), you know, like a "web tooltip" of some sort.
P.S. SilverAzide's workaround is a good idea too, but it will obviously cancel out any such mouse or other actions in the webpage itself. It depends on you which variant seems the most attractive and with the fewest drawbacks from your point of view.
-
- Posts: 19
- Joined: May 24th, 2023, 3:11 pm
Re: Deactivating Skins
Thanks to everyone for their suggestions.
To SilverAzide: I thought about that and tried it, but the WebView measure covers any meter regardless of where the meter is in the sequence.
To balala: I can try making a rmskin, but having not done that before it might take a little while.
I found out that I can put the MouseLeaveAction bang in the [Rainmeter] section of the skin. Depending on the size of the radar measure it pretty well does what I'm wanting.
Looking through the WebView examples, I noticed that within the script in the html page that WebView opens, it calls a command RainmeterAPI.Bang(' . . .'). Does anyone know anything about this? It seems to be incorporated in the file RainmeterAPI.h.
To SilverAzide: I thought about that and tried it, but the WebView measure covers any meter regardless of where the meter is in the sequence.
To balala: I can try making a rmskin, but having not done that before it might take a little while.
I found out that I can put the MouseLeaveAction bang in the [Rainmeter] section of the skin. Depending on the size of the radar measure it pretty well does what I'm wanting.
Looking through the WebView examples, I noticed that within the script in the html page that WebView opens, it calls a command RainmeterAPI.Bang(' . . .'). Does anyone know anything about this? It seems to be incorporated in the file RainmeterAPI.h.
-
- Rainmeter Sage
- Posts: 16699
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Deactivating Skins
Not absolutely needed, from my point of view. A zip or rar is good for me.RogerDodger wrote: ↑May 25th, 2023, 6:40 pm To balala: I can try making a rmskin, but having not done that before it might take a little while.
Yep, you can. If you do this, the bangs under the MouseLeaveAction option are executed when you're leaving the surface of the skin. I'm glad if you got it working more or less as expected.RogerDodger wrote: ↑May 25th, 2023, 6:40 pm I found out that I can put the MouseLeaveAction bang in the [Rainmeter] section of the skin. Depending on the size of the radar measure it pretty well does what I'm wanting.