It is currently September 29th, 2024, 11:21 am

Making a switch style button, and adding sliding images

Get help with creating, editing & fixing problems with skins
User avatar
Aceina
Posts: 6
Joined: September 9th, 2015, 4:10 am

Re: Making a switch style button, and adding sliding images

Post by Aceina »

That's exactly what I was trying to figure out! (and I can't believe I missed the dynamic variables). Thank you so much, this has helped me more than I could have ever predicted.
User avatar
jsmorley
Developer
Posts: 22786
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Making a switch style button, and adding sliding images

Post by jsmorley »

Glad to help. Have fun.
User avatar
Aceina
Posts: 6
Joined: September 9th, 2015, 4:10 am

Re: Making a switch style button, and adding sliding images

Post by Aceina »

So I've started having this problem where upon rainmeter starting or refreshing the skin, the first time I click the button that fades everything in, it only fades them in half way. Then, once I fade them out and fade them back in, it works normally and fades them the rest of the way in. I know it's not just my computer as it happens on two different computers using two different OS's (windows 8 and 10). Not sure if I should be posting this in the bug thread.....

Another problem I'm having is occasionally it's as if rainmeter is lagging, and it fades them in at about half speed or worse, and i have to restart to fix it (even then that doesn't always work)
This may be more a problem with my laptop than rainmeter, but maybe you guys know the solution.

Any thoughts as to how to fix these?
User avatar
Aceina
Posts: 6
Joined: September 9th, 2015, 4:10 am

Re: Making a switch style button, and adding sliding images

Post by Aceina »

also, here's my code:

Code: Select all

[Rainmeter]
Update=-1
DynamicWindowSize=1
AccurateText=1

[Metadata]
Name=SpinFade
Author=Joe Gale
Information=Skin to roll out a list of apps in a line. #S# * #F# must always equal 255 for full opacity. To add or subtract apps, add or subtract the following per skin: Alpha"X"=0 in Variables. FadeInX, #T#, #S# | Wait 20 | in ActionList1 and corresponding FadeInX value (do the same for FadeOutX). a corresponding MeterButton
License=Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/.
Version=1.0

[Variables]
Action=0
Alpha1=0
Alpha2=0
Alpha3=0
Alpha4=0
Alpha5=0
Alpha6=0
Alpha7=0
Alpha8=0
Alpha9=0
Alpha10=0
T=5
S=10
F=25.5
U=[!UpdateMeasure "Fader"][!UpdateMeter *][!Redraw]

[MeterFadeIn]
Meter=Image
ImageName=#@#Images\spincombr.png
W=100
H=100
Padding=5,5,5,5
LeftMouseUpAction=[!SetVariable Action "(1-#Action#)"][!UpdateMeasure "MeasureAction"]
DynamicVariables=1

[MeasureAction]
Measure=Calc
Formula=#Action#
IfCondition=(MeasureAction=0)
IfTrueAction=[!CommandMeasure Fader "Stop 1"][!CommandMeasure Fader "Execute 2"]
IfFalseAction=[!CommandMeasure Fader "Stop 2"][!CommandMeasure Fader "Execute 1"]
DynamicVariables=1

[Fader]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat FadeIn1, #T#, #S# | Wait 20 | Repeat FadeIn2, #T#, #S# | Wait 20 | Repeat FadeIn3, #T#, #S# | Wait 20 | Repeat FadeIn4, #T#, #S# | Wait 20 | Repeat FadeIn5, #T#, #S# | Wait 20 | Repeat FadeIn6, #T#, #S# | Wait 20 | Repeat FadeIn7, #T#, #S# | Wait 20 | Repeat FadeIn8, #T#, #S# | Wait 20 | Repeat FadeIn9, #T#, #S# | Wait 20 | Repeat FadeIn10, #T#, #S# | Wait 20 |
FadeIn1=[!SetVariable Alpha1 (Clamp(#Alpha1#+#F#,0,255))]#U#
FadeIn2=[!SetVariable Alpha2 (Clamp(#Alpha2#+#F#,0,255))]#U#
FadeIn3=[!SetVariable Alpha3 (Clamp(#Alpha3#+#F#,0,255))]#U#
FadeIn4=[!SetVariable Alpha4 (Clamp(#Alpha4#+#F#,0,255))]#U#
FadeIn5=[!SetVariable Alpha5 (Clamp(#Alpha5#+#F#,0,255))]#U#
FadeIn6=[!SetVariable Alpha6 (Clamp(#Alpha6#+#F#,0,255))]#U#
FadeIn7=[!SetVariable Alpha7 (Clamp(#Alpha7#+#F#,0,255))]#U#
FadeIn8=[!SetVariable Alpha8 (Clamp(#Alpha8#+#F#,0,255))]#U#
FadeIn9=[!SetVariable Alpha9 (Clamp(#Alpha9#+#F#,0,255))]#U#
FadeIn10=[!SetVariable Alpha10 (Clamp(#Alpha10#+#F#,0,255))]#U#
ActionList2=Repeat FadeOut10, #T#, #S# | Wait 20 | Repeat FadeOut9, #T#, #S# | Wait 20 | Repeat FadeOut8, #T#, #S# | Wait 20 | Repeat FadeOut7, #T#, #S# | Wait 20 | Repeat FadeOut6, #T#, #S# | Wait 20 | Repeat FadeOut5, #T#, #S# | Wait 20 | Repeat FadeOut4, #T#, #S# | Wait 20 | Repeat FadeOut3, #T#, #S# | Wait 20 |Repeat FadeOut2, #T#, #S# | Wait 20 |Repeat FadeOut1, #T#, #S# | Wait 20 |
FadeOut1=[!SetVariable Alpha1 (Clamp(#Alpha1#-#F#,0,255))]#U#
FadeOut2=[!SetVariable Alpha2 (Clamp(#Alpha2#-#F#,0,255))]#U#
FadeOut3=[!SetVariable Alpha3 (Clamp(#Alpha3#-#F#,0,255))]#U#
FadeOut4=[!SetVariable Alpha4 (Clamp(#Alpha4#-#F#,0,255))]#U#
FadeOut5=[!SetVariable Alpha5 (Clamp(#Alpha5#-#F#,0,255))]#U#
FadeOut6=[!SetVariable Alpha6 (Clamp(#Alpha6#-#F#,0,255))]#U#
FadeOut7=[!SetVariable Alpha7 (Clamp(#Alpha7#-#F#,0,255))]#U#
FadeOut8=[!SetVariable Alpha8 (Clamp(#Alpha8#-#F#,0,255))]#U#
FadeOut9=[!SetVariable Alpha9 (Clamp(#Alpha9#-#F#,0,255))]#U#
FadeOut10=[!SetVariable Alpha10 (Clamp(#Alpha10#-#F#,0,255))]#U#
DynamicVariables=1

[MeterButton1]
Meter=Image
ImageName=#@#Images\unreal.png
W=100
H=100
X=40r
Y=75r
ImageAlpha=#Alpha1#
Padding=5,5,5,5
LeftMouseUpAction=["C:\Program Files\Epic Games\Launcher\Portal\Binaries\Win64\EpicGamesLauncher.exe"]
DynamicVariables=1

[MeterButton2]
Meter=Image
ImageName=#@#Images\maya.png
W=100
H=100
X=0
Y=75r
ImageAlpha=#Alpha2#
Padding=5,5,5,5
LeftMouseUpAction=["C:\Program Files\Autodesk\Maya2016\bin\Maya.exe"]
DynamicVariables=1

[MeterButton3]
Meter=Image
ImageName=#@#Images\xnormal.png
W=100
H=100
X=40r
Y=75r
ImageAlpha=#Alpha3#
Padding=5,5,5,5
LeftMouseUpAction=["C:\Program Files\S.Orgaz\xNormal 3.19.2\x64\xNormal.exe"]
DynamicVariables=1

[MeterButton4]
Meter=Image
ImageName=#@#Images\quixel.png
W=100
H=100
X=0
Y=75r
ImageAlpha=#Alpha4#
Padding=5,5,5,5
LeftMouseUpAction=["C:\Users\Public\Quixel\SUITE\x64\bin\Release\Suite.exe"]
DynamicVariables=1

[MeterButton5]
Meter=Image
ImageName=#@#Images\zbrush.png
W=100
H=100
X=40r
Y=75r
ImageAlpha=#Alpha5#
Padding=5,5,5,5
LeftMouseUpAction=["C:\Program Files (x86)\Pixologic\ZBrush 4R7\ZBrush64.exe"]
DynamicVariables=1

[MeterButton6]
Meter=Image
ImageName=#@#Images\photoshop.png
W=100
H=100
X=0
Y=75r
ImageAlpha=#Alpha6#
Padding=5,5,5,5
LeftMouseUpAction=["C:\Program Files\Adobe\Adobe Photoshop CC 2015\Photoshop.exe"]
DynamicVariables=1

[MeterButton7]
Meter=Image
ImageName=#@#Images\aftereffects.png
W=100
H=100
X=40r
Y=75r
ImageAlpha=#Alpha7#
Padding=5,5,5,5
LeftMouseUpAction=["C:\Program Files\Adobe\Adobe After Effects CC 2015\Support Files\AfterFX.exe"]
DynamicVariables=1

[MeterButton8]
Meter=Image
ImageName=#@#Images\flash.png
W=100
H=100
X=0
Y=75r
ImageAlpha=#Alpha8#
Padding=5,5,5,5
LeftMouseUpAction=["C:\Program Files\Adobe\Adobe Flash CC 2015\Flash.exe"]
DynamicVariables=1

[MeterButton9]
Meter=Image
ImageName=#@#Images\illustrator.png
W=100
H=100
X=40r
Y=75r
ImageAlpha=#Alpha9#
Padding=5,5,5,5
LeftMouseUpAction=["C:\Program Files\Adobe\Adobe Illustrator CC 2015\Support Files\Contents\Windows\Illustrator.exe"]
DynamicVariables=1

[MeterButton10]
Meter=Image
ImageName=#@#Images\cloud.png
W=100
H=100
X=0
Y=75r
ImageAlpha=#Alpha10#
Padding=5,5,5,5
LeftMouseUpAction=["C:\Program Files (x86)\Adobe\Adobe Creative Cloud\ACC\Creative Cloud.exe"]
DynamicVariables=1