It is currently March 28th, 2024, 1:30 pm

How to refresh a hidden skin

Get help with creating, editing & fixing problems with skins
chabango
Posts: 5
Joined: March 14th, 2018, 12:11 am

How to refresh a hidden skin

Post by chabango »

Hi,
I have a skin that I am using as a notification "pop up" to users that is pulling form a TXT file now for Proof of Concept(will eventually be RSS feed)
I have it configured so that the user can click on it to hide it.
My issue is trying to have the hidden skin continue to check for changes to the source file even if it is hidden.
For example, i want to be able to update the source file, have the hidden skin pick up the change and popup to display the text.
Anyone have any good ideas?
Thanks
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: How to refresh a hidden skin

Post by fonpaolo »

First of all, if you add the "check" icon to your post, it will tell that the problem is solved.

Second, if a skin is hidden, it means that it's still loaded but non visible, doesn't mean that the skin isn't running only because it's hidden.
So, if it's really hidden, leave it as is, it will be updated accordingly to your Update rate.
If you mean that the skin is Unloaded, then, you can't update something that isn't even loaded.

I hope I was clear, in this case the correct terminology is essential. ;-)
chabango
Posts: 5
Joined: March 14th, 2018, 12:11 am

Re: How to refresh a hidden skin

Post by chabango »

Update is set to 1000 but even if I lower it, the skin does not update wit the new text if it has been hidden.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to refresh a hidden skin

Post by balala »

Please post the code you have so far OR if the skin uses some included files (.inc files, images), pack the whole config and upload it, to can take a look.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: How to refresh a hidden skin

Post by fonpaolo »

Not knowing how you made the skin, probably there's an error or some commands blocking the whole skin or some measures from updating.
I can assure you, in no way, hiding a skin you'll have a side effect causing a block to the update of your skin, because I'm using a lot of hidden skins, believe me. ;-)
chabango
Posts: 5
Joined: March 14th, 2018, 12:11 am

Re: How to refresh a hidden skin

Post by chabango »

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=60,60,60,255
OnRefreshAction=[!Move (#SCREENAREAWIDTH#/2)-100 (#SCREENAREAHEIGHT#/2)-50]


[Variables]
Notespath=C:\rainmeter\tempfile.txt


[measureNotes]
Measure=Plugin
Plugin=QuotePlugin
PathName="#Notespath#"
Separator=¶
OnChangeAction=[!UpdateMeter "MeterNotes"][!Redraw]

[meterTitle]
Meter=STRING
MeterStyle=styleTitle
FontColor=255,51,51
FontSize=15
Text="**** OCIO Notification Message ****"
;ToolTipTitle="Click to Remove"
;ToolTipType=1
;ToolTipIcon=INFO
;ToolTipText="Mouse click to remove"
;LeftMouseUpAction=[!Hide "#CurrentConfig#"]


[meterNotes]
Meter=String
MeterStyle=styleLeftText
FontColor=255,255,255
FontSize=15
MeterStyle=styleLeftText
w=400
y=40

Text="[measureNotes]"
UpdateDivider=-10
DynamicVariables=1
ClipString=2
AntiAlias=1
ToolTipTitle="Click to Remove"
ToolTipType=1
ToolTipIcon=INFO
ToolTipText="Mouse click to remove"
LeftMouseUpAction=[!Hide "#CurrentConfig#"]
Last edited by fonpaolo on March 14th, 2018, 12:31 pm, edited 1 time in total.
Reason: Please use the [Code] tags to display your code.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to refresh a hidden skin

Post by balala »

Let's clarify something first, because for me it is not clear at all: chabango what are you talking about, updating or to refreshing your skin? Because these are completely different things. If you're talking about updating it, there is nothing to discus about, because the skin is updating automatically on each update cycle, so once per second (due to the Update=1000 option set up in the [Rainmeter] section). If you're talking about refreshing the skin, it is possible, but a refreshed skin is reloaded again, everything being rebuilt.
So, for me at least for now isn't clear at all what you would like. Please give us some details, because as I see, neither fonpaolo didn't understand your request (right fonpaolo?).
chabango
Posts: 5
Joined: March 14th, 2018, 12:11 am

Re: How to refresh a hidden skin

Post by chabango »

Sorry, I hope this helps clarify.
The skin displays a message from a source file. If The user clicks on the skin to hide it, once it is hidden, the skin does not "unhide" if the source message changes. If the message changes in the source , the skin remains hidden and does not display the new message to the user.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: How to refresh a hidden skin

Post by fonpaolo »

Yes balala, you're right.
For what I can understand, chabango, maybe you may have some confusion on Rainmeter's terminology, or maybe you're trying to obtain something but not in the "right way".

As is, as balala said, the skin is updating regularly, even if, for me, once a second is too often.
I don't see, once you've hidden the skin, how you can make it visible again... probably using a command in another skin or the code posted is only a part of it?

UpdateDivider=-10 means nothing...
UpdateDivider=-1 means never update;
UpdateDivider=10 means after 10 seconds (1 second x 10).
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: How to refresh a hidden skin

Post by fonpaolo »

chabango wrote:Sorry, I hope this helps clarify.
The skin displays a message from a source file. If The user clicks on the skin to hide it, once it is hidden, the skin does not "unhide" if the source message changes. If the message changes in the source , the skin remains hidden and does not display the new message to the user.
If you want to show the skin, once the quote is updated (please read the post above), you can add to your [measureNotes]:

Code: Select all

OnChangeAction=[!Show "#CurrentConfig#"][!UpdateMeter "MeterNotes"][!Redraw]
Post Reply