It is currently March 29th, 2024, 3:23 pm

UpdateDivider lower than Update rate possible ?

General topics related to Rainmeter.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: UpdateDivider lower than Update rate possible ?

Post by jsmorley »

kyriakos876 wrote:So, I have

Code: Select all

LeftMouseUpAction=[!ShowMeter SomeMeter][!Refresh][!ShowMeter SomeOtherMeter]
Evetytome a refresh happens it restores every Set bang in the skin but here what's gonn happen if both meters have Hidden=1? Show both meters refresh and then hide them again or show one meter refresh and show the other after the refresh?
The refresh is going to undo anything else that is set. Embedding a !Refresh in a series of bangs in an action is really just pointless. Not sure what tree you are barking up here, but it's the wrong one... Order is just not important in this case. They all happen.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: UpdateDivider lower than Update rate possible ?

Post by kyriakos876 »

jsmorley wrote:The refresh is going to undo anything else that is set. Embedding a !Refresh in a series of bangs in an action is really just pointless. Not sure what tree you are barking up here, but it's the wrong one... Order is just not important. They all happen.
I will reply again with more details once I get home to provide you with my code in order to illustrate my situation and what I want to acomplish.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: UpdateDivider lower than Update rate possible ?

Post by kyriakos876 »

jsmorley wrote:The refresh is going to undo anything else that is set. Embedding a !Refresh in a series of bangs in an action is really just pointless. Not sure what tree you are barking up here, but it's the wrong one... Order is just not important in this case. They all happen.
Ok so, here is the part of the code I'm interested in goes like:

Code: Select all

[Rainmeter]
Update=1000

[Variables]
.
.

[Activate]
Meter=Button
ButtonImage=#@#.....
LeftMouseUpAction=[!WriteKeyValue Rainmeter Update "1000"][!Refresh][!ShowMeter Deactivate]
Hidden=1

[Deactivate]
Meter=Button
ButtonImage=#@#.....
LeftMouseUpAction=[!WriteKeyValue Rainmeter Update "-1"][!Refresh][!ShowMeter Activate]
Hidden=1
So what I wanna do is Set Rainmeter Update -1 so that nothing gets updated but to apply this I have to Refresh the skin. If I do that, the skin will reset the ShowMeter options and no button will be displayed. (I know that I can add a variable and when the button is clicked change the value and then have a measure to show the Meter I want depending on the Value of the variable, but the whole point is to avoid this) I hope you understand what I'm saying because it's a bit weird (not as weird as I am tho) :P

Note: I didn't add the whole code because that's all that matters. Adding +4k lines of code would just distract you from the point and waste time :D
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: UpdateDivider lower than Update rate possible ?

Post by mak_kawa »

Hi kyriakos876

Too late and maybe I misunderstand what you want... but does such code help you?

Code: Select all

[Rainmeter]
Update=1000

[Activate]
Meter=Button
ButtonImage=...
LeftMouseUpAction=[!WriteKeyValue Rainmeter Update "1000"][!WriteKeyValue Activate Hidden 1][!WriteKeyValue Deactivate Hidden 0][!Refresh]
Hidden=1

[Deactivate]
Meter=Button
ButtonImage=...
LeftMouseUpAction=[!WriteKeyValue Rainmeter Update "-1"][!WriteKeyValue Activate Hidden 0][!WriteKeyValue Deactivate Hidden 1][!Refresh]
Hidden=0
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: UpdateDivider lower than Update rate possible ?

Post by kyriakos876 »

mak_kawa wrote:Hi kyriakos876

Too late and maybe I misunderstand what you want... but does such code help you?

Code: Select all

[Rainmeter]
Update=1000

[Activate]
Meter=Button
ButtonImage=...
LeftMouseUpAction=[!WriteKeyValue Rainmeter Update "1000"][!WriteKeyValue Activate Hidden 1][!WriteKeyValue Deactivate Hidden 0][!Refresh]
Hidden=1

[Deactivate]
Meter=Button
ButtonImage=...
LeftMouseUpAction=[!WriteKeyValue Rainmeter Update "-1"][!WriteKeyValue Activate Hidden 0][!WriteKeyValue Deactivate Hidden 1][!Refresh]
Hidden=0
Hello, thanks for answering. No this wouldn't solve my problem because there is a case in which none of the meters show and your code indicates that at least one of them is shown. I, eventually, changed my whole code which is kinda what I was trying to avoid but yea... couldn't find a solution without adding more lines of code there :D Thanks though!