It is currently October 13th, 2024, 4:53 pm
Sliding a Skin with ActionTimer
-
- Posts: 97
- Joined: April 3rd, 2018, 11:15 am
Re: Sliding a Skin with ActionTimer
Thank you for that answer. It sounds EXTREMELY complicated at first sight, but I'm going to put my hands in to fully understand each step and come back to you to give the final result if I succeed ^^
-
- Posts: 591
- Joined: February 28th, 2011, 3:20 pm
- Location: Vienna, Austria
Re: Sliding a Skin with ActionTimer
You are right. At first sight. But at the second view it isn't. Just imagine:
- to position something at a circle, you have to define the angle.
- to slide (move) something on a circle you have to change that angle (increase/decrease)
for 2. changing the angle is done by an action-timer measure which, well, changes the angle and updates the meter to reflect the new position
The only thing - for me - was to remember my time in school when i learned how something is positioned on a circle. For this question Wikipedia helped me with the polar coordinates.
For positioning something on a circle, i need 3 things:
- the center of the circle (x- and y-coordinates): i use variables for it, so i can easily use them in formulas
- the radius of the circle
- the angle at which the "something" should appear
x-position:
Code: Select all
[x-coordinate of the center of the circle] + [radius of the circle] * cosinus(angle)
Code: Select all
[y-coordinate of the center of the circle] + [radius of the circle] * sinus(angle)
please don't hesitate to ask questions whenever they arise!
-
- Posts: 26
- Joined: June 9th, 2020, 9:35 am
Re: Sliding a Skin with ActionTimer
Hi guys and girls...
Thanks in advance for any assistance.
I've used jsmorley's skin sliding code. I'm using it for a music player and want it to slide/hide only when there is no music playing.
I've tried a few things without any luck and haven't done much with actiontimer etc yet so a little over my head atm.
I do have a measure setup to detect the 'player' state but not sure how to trigger the menu to hide or close by itself.
Cheers.
This is the initial code that i used for the sliding skin.
Thanks in advance for any assistance.
I've used jsmorley's skin sliding code. I'm using it for a music player and want it to slide/hide only when there is no music playing.
I've tried a few things without any luck and haven't done much with actiontimer etc yet so a little over my head atm.
I do have a measure setup to detect the 'player' state but not sure how to trigger the menu to hide or close by itself.
Cheers.
This is the initial code that i used for the sliding skin.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
SkinWidth=220
SkinHeight=185
[Metadata]
Name=SlideDemo\SimpleToRight
Author=JSMorley
Version=May 11, 2016
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Information=Demonstration of using ActionTimer to slide out a panel
[Variables]
OffSet=-190
State=1
U=[!UpdateMeasure MeasureSlider][!UpdateMeter *][!Redraw]
; Slider Measure
[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideRight, 2, 22
SlideRight=[!SetVariable State "2"][!SetVariable OffSet "(Clamp(#OffSet#+9,-190,0))"]#U#
ActionList2=Repeat SlideLeft, 2, 22
SlideLeft=[!SetVariable State "1"][!SetVariable OffSet "(Clamp(#OffSet#-9,-190,0))"]#U#
DynamicVariables=1
; Meters
[MeterBack]
Meter=Image
X=#OffSet#
W=220
H=185
SolidColor=16,42,55,255
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure MeasureSlider "Execute #State#"]
-
- Posts: 26
- Joined: June 9th, 2020, 9:35 am
Re: Sliding a Skin with ActionTimer
I actually solved this. Not sure if it's the best way to do it though as i'm seeing higher CPU usage on Rainmeter so suspecting im creating some loop somewhere.
This is the code i used to autohide the sliding skin for anyone else looking for a solution to this.
Is there a better way to trigger the sliding skin?
Thanks
This is the code i used to autohide the sliding skin for anyone else looking for a solution to this.
Code: Select all
[MeasurePlayerState]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=State
IfCondition=MeasurePlayerState = 1
IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"]
IfFalseAction=[!DisableMeasureGroup "Vismeasure"][!HideMeterGroup "VisMeter"][!CommandMeasure MeasureSlider "Execute 2"]
DynamicVariables=1
Thanks
-
- Rainmeter Sage
- Posts: 16651
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Sliding a Skin with ActionTimer
I have one single suggestion for you: on both options IfTrueAction and IfFalseAction, beside the Execute statement, you should also add some bangs to stop the other command:
Code: Select all
[MeasurePlayerState]
...
IfCondition=MeasurePlayerState = 1
IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"][!CommandMeasure MeasureSlider "Stop 2"]
IfFalseAction=[!DisableMeasureGroup "Vismeasure"][!HideMeterGroup "VisMeter"][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 2"]
...
-
- Posts: 26
- Joined: June 9th, 2020, 9:35 am
Re: Sliding a Skin with ActionTimer
Thanks balala for the suggestions.
That has seemed to help in the cpu usage slightly and all is working well.
That has seemed to help in the cpu usage slightly and all is working well.
-
- Rainmeter Sage
- Posts: 16651
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Sliding a Skin with ActionTimer
Did it? I'm glad in this case.
-
- Posts: 9
- Joined: October 14th, 2021, 7:34 pm
- Location: USA
Re: Sliding a Skin with ActionTimer
First of all... really cool! Second, I am still a beginner at the rainmeter thing let alone the fact that you are speaking post-graduate level "blah" lol. I would never understand any of that. But, is the skin for this available by chance? I mean, would love to have it if it is available as it is sweet!
I do understand this post was 8+ years ago but still I figured I would try.
Thanks either way my friend. Talent needs to be recognized!
-
- Rainmeter Sage
- Posts: 8443
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Sliding a Skin with ActionTimer
I don't know whether it has the animation presented in that GIF, but just by looking through DanielPodo's posts on the forum, this seems close to what he presented:Neocube wrote: ↑January 2nd, 2024, 9:35 am First of all... really cool! Second, I am still a beginner at the rainmeter thing let alone the fact that you are speaking post-graduate level "blah" lol. I would never understand any of that. But, is the skin for this available by chance? I mean, would love to have it if it is available as it is sweet!
I do understand this post was 8+ years ago but still I figured I would try.
Thanks either way my friend. Talent needs to be recognized!
https://forum.rainmeter.net/viewtopic.php?t=23440
That being said, he mentioned that his skin is itself a rewrite of another skin, so not sure if it's what you're after. If anything, you could search by image using that GIF, maybe you'll get lucky and find closer matches for it.
-
- Posts: 77
- Joined: March 30th, 2016, 1:50 pm
Re: Sliding a Skin with ActionTimer
Ha! You're in luck!Neocube wrote: ↑January 2nd, 2024, 9:35 am First of all... really cool! Second, I am still a beginner at the rainmeter thing let alone the fact that you are speaking post-graduate level "blah" lol. I would never understand any of that. But, is the skin for this available by chance? I mean, would love to have it if it is available as it is sweet!
I do understand this post was 8+ years ago but still I figured I would try.
Thanks either way my friend. Talent needs to be recognized!
After taking a few years break (due to a lot of personal sh*t going down in my life), I'm slowly getting back into all the things I left over the years, includinng making Rainmeter skins.
Dm sent!