It behaves as you've designed it...
When you click on the [meterWindowOn] image, you'll hide the first and show [meterWindowOff], only the last has the command to "Update" the [measuremail] misure, so, only it can do what you want, if you have [meterWindowOn] showed, there's nothing you can click to update.
As a side note an update of 60, if you're using only the code above is really too much.
It is currently April 26th, 2024, 6:39 pm
[Solved] Everything works, except for !Update...
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
-
- Rainmeter Sage
- Posts: 16173
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Everything works, except for !Update...
fonpaolo is (at least partially) right. Take into account the following: when the skin is loaded, the [measureMail] WebParser measure will return a number and according to its value, one of the [meterWindowOn] and [meterWindowOff] meters will be shown, the other will be hidden. If the [meterWindowOff] meter is shown, you can click to update the [measureMail] measure, but after this, could happen to, depending on the returned value, the [meterWindowOff] meter to became hidden. In this case you won't be able to click it, because it's not visible.AzeTheGreat wrote:On the [meterWindowOff] meter I have a leftMouseUpAction that should update the measureMail portion. The idea is I can click it to instantly update, which will be nice when I'm done testing and the update interval is much longer. That's the refresh click. This functions, however it stops working after I click of the [meterWindowOn] meter, I assume because I then force change the meters. I'm not sure why this would affect it though...
I don't know what would be the solution, because I can't see what would you like to achieve. Maybe add the same [!CommandMeasure "measureMail" "Update"] bang to the LeftMouseUpAction option of the [meterWindowOn] too?
fonpaolo, I think that's not too much, on the contrary, it's too little...fonpaolo wrote:As a side note an update of 60, if you're using only the code above is really too much.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: Everything works, except for !Update...
Well, that's exactly what I was trying to say, maybe I said it improperly.balala wrote:...
fonpaolo, I think that's not too much, on the contrary, it's too little...
-
- Posts: 16
- Joined: January 13th, 2017, 1:08 am
Re: Everything works, except for !Update...
I think you guys are slightly misinterpreting what I'm trying to say. There are supposed to be two behaviors: When there is a notification ([meterWindowOn]) clicking should open up my reddit inbox. This works correctly, and how I want it to. Then, when there is currently no notification ([meterWindowOff]), clicking on that meter should "refresh" by checking the site again. Now, this function works only sometimes. If I load the skin when I have no messages it starts on meterWindowOff. If I receive a message, then click, it properly refreshes and switches to meterWindowOn. This continues to work as long as I never click on meterWindowOn. As soon as I click on meterWindowOn, the "refresh" component breaks; I have to let the skin update itself for it to keep working (which I changed to 1000, by the way). I was able to fix this by changing that line from: to: Since it works I'm ok with it, but I can't help but feel that it's not optimal, and I would at least like to understand what's wrong with the other method.
Code: Select all
LeftMouseUpAction = [!CommandMeasure "measureMail" "Update"]
Code: Select all
LeftMouseUpAction = [!Refresh]
-
- Rainmeter Sage
- Posts: 16173
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Everything works, except for !Update...
There is a problem with your last posted code: in the [measureSelectWindow] measure, the IfBelowValue / IfBelowAction option pair is ok, but the IfEqualValue don't has an IfEqualAction pair, respectively the IfAboveAction don't has an IfAboveValue pair. This is truly a problem, which could be fixed adding the appropriate options, if I'm not wrong, the following ones:
Another possibility: replace the IfEqualValue=1 option with IfAboveValue=0.
The best (in my opinion) solution: replace the old IfBelowValue / IfBelowAction / (and so on) with the newer IfCondition:
Code: Select all
IfAboveValue=1
IfEqualAction=[!ShowMeter meterWindowOn][!HideMeter meterWindowOff]
The best (in my opinion) solution: replace the old IfBelowValue / IfBelowAction / (and so on) with the newer IfCondition:
Code: Select all
[measureSelectWindow]
...
IfCondition=(measureSelectWindow=0)
IfTrueAction=[!ShowMeter meterWindowOff][!HideMeter meterWindowOn]
IfFalseAction=[!ShowMeter meterWindowOn][!HideMeter meterWindowOff]
-
- Posts: 16
- Joined: January 13th, 2017, 1:08 am
Re: Everything works, except for !Update...
Ah thanks, you're right that that's cleaner. It doesn't fix the problem though...balala wrote:There is a problem with your last posted code: in the [measureSelectWindow] measure, the IfBelowValue / IfBelowAction option pair is ok, but the IfEqualValue don't has an IfEqualAction pair, respectively the IfAboveAction don't has an IfAboveValue pair. This is truly a problem, which could be fixed adding the appropriate options, if I'm not wrong, the following ones:Another possibility: replace the IfEqualValue=1 option with IfAboveValue=0.Code: Select all
IfAboveValue=1 IfEqualAction=[!ShowMeter meterWindowOn][!HideMeter meterWindowOff]
The best (in my opinion) solution: replace the old IfBelowValue / IfBelowAction / (and so on) with the newer IfCondition:Code: Select all
[measureSelectWindow] ... IfCondition=(measureSelectWindow=0) IfTrueAction=[!ShowMeter meterWindowOff][!HideMeter meterWindowOn] IfFalseAction=[!ShowMeter meterWindowOn][!HideMeter meterWindowOff]
-
- Rainmeter Sage
- Posts: 16173
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Everything works, except for !Update...
I'd remove the [!ShowMeter meterWindowOff][!HideMeter meterWindowOn] bangs from the LeftMouseUpAction option of the [meterWindowOn] meter, because what image (button) you have to see (and the appropriate click action), should depend on the real number of the unread messages, not on where you've clicked.AzeTheGreat wrote:Ah thanks, you're right that that's cleaner. It doesn't fix the problem though...
-
- Posts: 16
- Joined: January 13th, 2017, 1:08 am
Re: Everything works, except for !Update...
I considered that, but clicking the button takes me to my unread messages, which means they'll all be read anyways. The problem is, the web check checks before I've loaded the page, so it stays on for another five minutes even though it should be off (unless I was to click it again). I just don't understand why that's breaking the refresh function...balala wrote:I'd remove the [!ShowMeter meterWindowOff][!HideMeter meterWindowOn] bangs from the LeftMouseUpAction option of the [meterWindowOn] meter, because what image (button) you have to see (and the appropriate click action), should depend on the real number of the unread messages, not on where you've clicked.
-
- Rainmeter Sage
- Posts: 16173
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Everything works, except for !Update...
And if you add a [!CommandMeasure "measureMail" "Update"] bang to the LeftMouseUpAction option of the [meterWindowOn], besides the existing ["http://www.reddit.com/message/unread/"]?
-
- Posts: 16
- Joined: January 13th, 2017, 1:08 am
Re: Everything works, except for !Update...
I could have sworn I tried that...balala wrote:And if you add a [!CommandMeasure "measureMail" "Update"] bang to the LeftMouseUpAction option of the [meterWindowOn], besides the existing ["http://www.reddit.com/message/unread/"]?
Oh well, thanks for your help!