Oh yeah, that too. So, no sex at this party...
It is currently April 20th, 2024, 1:16 am
HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
-
- Posts: 79
- Joined: August 27th, 2016, 12:49 am
Re: HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
(1) Here's my youtube video showing the quote skin plus the butterfly animation that I posted before the awesome code posted by eclectic-tech. Blue butterfly has 241 frames, Yellow butterfly has 100 frames :Yincognito wrote: ↑October 8th, 2020, 12:42 pm I think displaying a quote at a specific time interval is not going to be an issue, but some details about what kind of animation you intend to use (and why would you need a different skin for it) would be useful.
[Youtube]https://www.youtube.com/watch?v=_0ADpmT6in8&feature=youtu.be&ab_channel=strawberryyogurt0[/Youtube]
(2) I needed a different skin for two animation because I never figured out how to put two of the same type of animation in a skin.ini file. With the partial implementation, the 'first animation' is frozen on screen, the second animation plays.
PARTIAL portion of the code for animation.ini showing what I have tried to combine two animations, but doesn't work:
FULL CODE for animation.ini :
Just for the sake of completion (also in case I need to reference this in the future if I ever forget), the animation code for both endless loop and single loop animations (code was found here on Rainmeter's official forum:
-
- Posts: 79
- Joined: August 27th, 2016, 12:49 am
Re: HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
By the way, how did you post that Gif animation of Newman as an attachment. I managed give Newman a transparent background to create a rainmeter animation GIF. I was going to post it here but don't exactly know how to go about doing to so... thus a youtube video of it.
https://www.youtube.com/watch?v=Pv3RaZQXxfI&feature=youtu.be&ab_channel=strawberryyogurt0
Maybe this Imgur link of Newman will work:
Maybe this direct imgur link will work: https://imgur.com/a/IOvN7OK
Would you be surprised if I said I got my username not because of the dessert nor the cartoon character. I like strawberries and simply wanted something else that sounded nice, and shortcake just so happens to sound nice. But yes, ice cold strawberryshortcake desserts or any ice cold desserts of any kind are great.
Awesome stuff. Magnificent work.
Worked perfectly for sequential quotes to display both new quotes and trigger my animation at the top of the hour (or any time interval specified). Loading the skin at 10:59 PM and 45 seconds will still allow the skin to refresh at 11:00 PM, then 12:00 AM, etc. if I set it refresh to 1 hour. Perfect.
Appreciate all the other additions for cleaner more effective code. Love the addition of "UpdateTime" and "AnimationTimeOut" adjustable variables. Makes life easier. That solves one mystery.
But how would I approach this (have them trigger at the top of hour along with having the animation play simultaneously as well) with the standard quoteplugin skins that is normally found all over deviantart? Quoteplugin displays random quotes in no specific order, and they load/refresh at the top of the hour. I'm perfectly fine with sometimes wanting random quotes triggering, but these random quoteplugin skins don't refresh at set intervals? I'm sure it depends on the "time" variable that you did with the above sequential ordered quote skin, but I'm kind of at a lost on how to properly implement the time variable to these random quoteplugin skins?
Here's a quoteplugin code drafted by JSMORLEY. The addition of OnUpdateAction to the Quote Measure for quoteplugin skins finally allows me to have animation trigger automatically without using the mouseaction for random quote skins. But the big/inconvenience issue is that the specified time interval slowly but surely changes over time.
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
strawberryshortcake wrote: ↑October 9th, 2020, 6:52 am(2) I needed a different skin for two animation because I never figured out how to put two of the same type of animation in a skin.ini file. With the partial implementation, the 'first animation' is frozen on screen, the second animation plays.
Maybe this will help...strawberryshortcake wrote: ↑October 9th, 2020, 8:07 amBut how would I approach this (have them trigger at the top of hour along with having the animation play simultaneously as well) with the standard quoteplugin skins that is normally found all over deviantart? Quoteplugin displays random quotes in no specific order, and they load/refresh at the top of the hour. I'm perfectly fine with sometimes wanting random quotes triggering, but these random quoteplugin skins don't refresh at set intervals? I'm sure it depends on the "time" variable that you did with the above sequential ordered quote skin, but I'm kind of at a lost on how to properly implement the time variable to these random quoteplugin skins?
Code:
Code: Select all
[Variables]
TimeIntervalSeconds=10
ImageNumberOneCount=6
ImageNumberTwoCount=6
ImageNumberOneStep=0
ImageNumberTwoStep=0
[Rainmeter]
Update=25
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255
---Measures---
[Time]
Measure=Time
IfCondition=(([Time:TimeStamp]%#TimeIntervalSeconds#)=0)
IfTrueAction=[!SetVariable ImageNumberOneStep 1][!SetVariable ImageNumberTwoStep 1][!UpdateMeasure MeasureQuote][!UpdateMeter MeterQuote][!Redraw]
DynamicVariables=1
[MeasureQuote]
Measure=Plugin
Plugin=QuotePlugin
PathName=#@#Quote.txt
UpdateDivider=-1
[MeasureImageNumberOne]
Measure=Calc
Formula=((MeasureImageNumberOne+#ImageNumberOneStep#)%#ImageNumberOneCount#)
OnUpdateAction=[!SetVariable ImageNumberOneStep (([MeasureImageNumberOne]=0)?(0):(#ImageNumberOneStep#))]
DynamicVariables=1
[MeasureImageNumberTwo]
Measure=Calc
Formula=((MeasureImageNumberTwo+#ImageNumberTwoStep#)%#ImageNumberTwoCount#)
OnUpdateAction=[!SetVariable ImageNumberTwoStep (([MeasureImageNumberTwo]=0)?(0):(#ImageNumberTwoStep#))]
DynamicVariables=1
---Meters---
[MeterImageOne]
Meter=Image
ImageName=#@#[MeasureImageNumberOne].png
DynamicVariables=1
[MeterImageTwo]
Meter=Image
X=0R
ImageName=#@#[MeasureImageNumberTwo].png
DynamicVariables=1
[MeterQuote]
Meter=STRING
Y=0R
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
MeasureName=MeasureQuote
Text="Quote: %1"
UpdateDivider=-1
If you have any other question, feel free to ask. My code is not intented to replace eclectic-tech's, but merely to answer your "how to" questions in the last replies. Once you figure out how to do this, you can pretty much modify any such code to suit your needs.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 79
- Joined: August 27th, 2016, 12:49 am
Re: HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
Part 1: Problems, concerns (maybe I'm overlooking something):
For some reason (maybe I'm overlooking something) removing both .... [!UpdateMeter MeterQuote][!Redraw] in the [Time] section and UpateDivider=-1 in the [MeterQuote]'s section .... doesn't do what I expect unless I have a misunderstanding for what it does.
After removing those elements above, loading the skin at say 2:40:40 (load) (and TimeIntervalSeconds=15), both the animation and quote will still play at 2:00:45 / 2:01:00 / 2:01:15 ( which is actually perfect) as opposed to 2:40:55, 2:41:10, 2:41:25. Because the code is suppose to be intended to do something else, I'm interested in knowing why it's not doing what it's suppose to.
Part 2: Awesome Super code.
Youtube link (not sure why the message board's youtube bracket doesn't work: https://www.youtube.com/watch?v=I5QJge0PN9E&feature=youtu.be&ab_channel=strawberryyogurt0
This also possibly answers a question that I had years ago about "linking two animations" together. I'll have to test and fiddle around with the code to get a better understanding. But for now it definitely does what I'v always wondered and wanted.
Love both eclectic-tech and your code. Will be using both. I'll have to test out your code on linking together multiple animations when I get a chance.
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
Yeah, I'm not sure why removing those bits doesn't work for you, because they certainly do for me (I obviously don't have your images to test, but tried just now with your posted code, even with different ...Counts variables, like 3 and 6, simulating your different length animations and didn't have any issues whatsoever). It's easy to understand what removing those bits does: it simply lets Rainmeter's own automatically triggered update and redraw (once every 25 ms) to handle displaying that meter in the new circumstances, instead of doing this "on demand". So it should work.strawberryshortcake wrote: ↑October 10th, 2020, 10:23 amTwo part comment:
Part 1: Problems, concerns (maybe I'm overlooking something):
For some reason (maybe I'm overlooking something) removing both .... [!UpdateMeter MeterQuote][!Redraw] in the [Time] section and UpateDivider=-1 in the [MeterQuote]'s section .... doesn't do what I expect unless I have a misunderstanding for what it does.
After removing those elements above, loading the skin at say 2:40:40 (load) (and TimeIntervalSeconds=15), both the animation and quote will still play at 2:00:45 / 2:01:00 / 2:01:15 ( which is actually perfect) as opposed to 2:40:55, 2:41:10, 2:41:25. Because the code is suppose to be intended to do something else, I'm interested in knowing why it's not doing what it's suppose to.
Part 2: Awesome Super code.
Youtube link (not sure why the message board's youtube bracket doesn't work: https://www.youtube.com/watch?v=I5QJge0PN9E&feature=youtu.be&ab_channel=strawberryyogurt0
This also possibly answers a question that I had years ago about "linking two animations" together. I'll have to test and fiddle around with the code to get a better understanding. But for now it definitely does what I'v always wondered and wanted.
Love both eclectic-tech and your code. Will be using both. I'll have to test out your code on linking together multiple animations when I get a chance.
Maybe posting the entire skin (images and other dependencies included) might give an answer as to why removing those bits doesn't work in your case. By the way, make sure the images are ALREADY generated before attempting the animations.
Other than that, YouTube links do work, but you have to remove that &feature=youtu.be&ab_channel=strawberryyogurt0 junk at the end of the URL:
-
- Posts: 79
- Joined: August 27th, 2016, 12:49 am
Re: HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
I decided to install rainmeter on a different computer with your uploaded quote skin with the 6 included default images. Commented out [!UpdateMeter MeterQuote][!Redraw]in the [Time] section and UpateDivider=-1 from [MeterQuote], and the quote/animation still don't do what they're suppose to do.
TimeIntervalSeconds=15
@9:21:10 (skin load/refresh manually)
@9:21:14
@9:21:29
@9:21:44
@9:21:59
Here's the full code:
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
Using the exact same code, I got this behavior here (MediaFire link). Nothing out of the ordinary or strange, as you can see.strawberryshortcake wrote: ↑October 10th, 2020, 4:25 pm I decided to install rainmeter on a different computer with your uploaded quote skin with the 6 included default images. Commented out [!UpdateMeter MeterQuote][!Redraw]in the [Time] section and UpateDivider=-1 from [MeterQuote], and the quote/animation still don't do what they're suppose to do.
TimeIntervalSeconds=15
@9:21:10 (skin load/refresh manually)
@9:21:14
@9:21:29
@9:21:44
@9:21:59
Here's the full code [...]
By the way, do you have Hardware Acceleration checked in Rainmeter's settings? I don't. If you do have it checked though, that might be a cause of some unexpected behavior on some hardware, as far as I know.
EDIT: By the way, I'm not sure what you expect to happen and it doesn't happen, maybe I didn't understand what you meant properly, so if you can, please explain it again in simple and clear terms, in case I missed something. If by any chance you talk about the "0" image still staying on the screen after the "1" to "N" (in this case, "5") iteration was displayed, this is intentional. You probably have your frames numbered from 1 to N too, so if you want the image to "disappear" when the iteration is over, just create a "0.png" (or any extension you use there) image that is either entirely or "almost" transparent and place it along your 1 to N images in the desired folder. After the animation iterates from 1.png to N.png, it will fall back to 0.png, and since the latter is more or less transparent, it will create the illusion of no image being displayed there. In other words, you'll need a 0.png plus your actual animation images in the folder where you get the images from. Sure, the 0.png could even be missing, as I don't think Rainmeter will issue an error in that case and just silently fail, all I'm saying is that if you intend to not display anything between animation "bursts", then your first actual animation frame should be 1.png (i.e. numbering starting at 1 instead of 0) - meaning that 0.png will be a "fake" image displayed between the end of the previous animation and the start of the following one. Hopefully I've been clear enough in my explanation, if by any chance this was the issue.
-
- Posts: 79
- Joined: August 27th, 2016, 12:49 am
Re: HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
After seeing your video, I think I may have misinterpreted your earlier statement. Because the video is exactly how mines also look when I have TimeIntervalSeconds=15 .
Situation A ( Desired Effect )
This is the provided log time in your video:
19:44:21 (skin loads)
19:44:30 (1st update cycle of skin)
19:44:45 (2nd update cycle of skin because TimeIntervalSeconds=15
19:45:00
19:45:15
19:45:30
I had the impression that removing or (commenting out) [!UpdateMeter MeterQuote][!Redraw] in the [Time] section and UpateDivider=-1 from [MeterQuote] would do the following
This is what I thought would happen when TimeIntervalSeconds=15
Situation B ( Undesirable Effect )
19:44:21 (skin loads)
19:44:36 (1st update cycle of skin, 15 second interval ... 15 seconds from when the skin was loaded)
19:44:51 (2nd update cycle of skin, 15 second interval)
19:45:06 (3rd update cycle of skin, 15 second interval)
19:45:21
Because keeping [!UpdateMeter MeterQuote][!Redraw] in [Time] section and UpateDivider=-1 in [MeterQuote] in the code actually does the same thing as your video, and I could not tell the difference when I left those elements out of in the code, I wasn't sure what changes were suppose to happen. But since your video actually showcases exactly how mines look, then I think the 'concern' was never really a concern at all. In other words, it's working perfectly as is.
Regarding your edit portion, yes, I had to think about that when I was fiddling with the code to see how I can have the animation disappear, then reappear, then disappear. And your suggestion is exactly what I tried and it worked.
Side Note: I'm going to be posting an issue (in a new thread maybe later today or tomorrow) with another skin -- it's regarding actiontimer. I'm going to see if I can fiddle with it to solve the problem (error: 'ActionList1' is currently running) , but it's been a couple days of trying to work it out. No success yet.The error doesn't always happen; I wanted to see what would happen if I mouseoveraction on something rapidly to see what would happen and if there are error codes associated with it.
Last edited by strawberryshortcake on October 10th, 2020, 7:42 pm, edited 2 times in total.
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: HELP: !Toggle (or !Activate Config) another skin (i.e. QUOTE skins) based on TIME (without using mouse action).
Ah, ok then - all sorted out. I was sure there was some sort of misunderstanding in all this, because the code didn't produce any kind of undesirable effects (as you called them), so in theory it should have worked the same in your case (which it did, after all).strawberryshortcake wrote: ↑October 10th, 2020, 7:13 pm After seeing your video, I think I may have misinterpreted your earlier statement. Because the video is exactly how mines also look when I have TimeIntervalSeconds=15 .
[...]
Side Note: I'm going to be posting an issue (in a new thread maybe later today or tomorrow) with another skin -- it's regarding actiontimer. I'm going to see if I can fiddle with it to solve the problem (error: 'ActionList1' is currently running) , but it's been a couple days of trying to work it out. No success yet.The error doesn't always happen; I wanted to see what would happen if I mouseoveraction on something rapidly to see what would happen and if there are error codes associated with it.
Regarding ActionTimer, that error is because you didn't properly stop the previously running action before executing a new one. In other words, the error happens if two or more such actions "overlap" from a time point of view.