It is currently May 3rd, 2024, 7:47 am

!SetOption and @Include Questions

Get help with creating, editing & fixing problems with skins
User avatar
Dice2121
Posts: 10
Joined: August 18th, 2011, 10:48 pm

!SetOption and @Include Questions

Post by Dice2121 »

Hello,

I am new to the forums but have been working with Rainmeter for quite some time now. I simply have a couple questions that I wanted some insight on.

1. Is there a way to speed up the responsiveness of the !SetOption bang without having a crazy fast "Update="?

I know that the !SetOption bang will temporarily change a setting for an update cycle, which I have found to be true but unfortunately, the skin has to update before the changes take effect. For example, I'm using it to change text that's white to blue using !MouseOverAction to create a "highlighted" or "selected" feel. However, this creates a lag between the time when I mouse over to the time when the skin updates and the text changes to blue. Adding !Redraw doesn't help either, my guess is due to !SetOption's ability to only change the setting on an update cycle. So, is there a work around?

2. If I use @Include to include a shared weather measure (parser) throughout multiple, let's say 3, skins; will Rainmeter end up parsing the weather website once or three times?

I ask this because I don't want to parse the weather website more times than I need to. It would be nice to have multiple weather skins all using the same information from a single parse. Is it possible?

That's all I have for now. Thanks.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: !SetOption and @Include Questions

Post by Kaelri »

Dice2121 wrote:1. Is there a way to speed up the responsiveness of the !SetOption bang without having a crazy fast "Update="?
You can send the !Update bang along with your !SetOption bang, as such:

Code: Select all

MouseOverAction=!Execute [!SetOption Meter FontColor "0,0,255"][!Update]
Note that this will advance the entire skin by one update cycle, so if you're using it on a skin with (for example) a WebParser measure, an excessive number of mouseovers within a short time would effectively increase the WebParser's refresh rate. (Of course, you'd have to do this for hours at a time to see any significant effect on your bandwidth.)
Dice2121 wrote:2. If I use @Include to include a shared weather measure (parser) throughout multiple, let's say 3, skins; will Rainmeter end up parsing the weather website once or three times?

I ask this because I don't want to parse the weather website more times than I need to. It would be nice to have multiple weather skins all using the same information from a single parse. Is it possible?
If you use @include in the way you describe, you will indeed make three separate connections to the site. You can avoid this by having only one of the skins connect to the site, and use the DownloadFile setting to save the feed contents to a local text file. Your other two skins can then simply parse the local copy without making additional connections.
User avatar
Dice2121
Posts: 10
Joined: August 18th, 2011, 10:48 pm

Re: !SetOption and @Include Questions

Post by Dice2121 »

Kaelri wrote: You can send the !Update bang along with your !SetOption bang, as such:

Code: Select all

MouseOverAction=!Execute [!SetOption Meter FontColor "0,0,255"][!Update]
Note that this will advance the entire skin by one update cycle, so if you're using it on a skin with (for example) a WebParser measure, an excessive number of mouseovers within a short time would effectively increase the WebParser's refresh rate. (Of course, you'd have to do this for hours at a time to see any significant effect on your bandwidth.)
Awesome, thanks for the fast reply. Tested it out and works how I want it to. This is very good news since it will remove a lot of code and streamline my "highlighting" process.
Kaelri wrote: If you use @include in the way you describe, you will indeed make three separate connections to the site. You can avoid this by having only one of the skins connect to the site, and use the DownloadFile setting to save the feed contents to a local text file. Your other two skins can then simply parse the local copy without making additional connections.
Alright, I'll have to experiment with that. Thanks again.