It is currently April 25th, 2024, 12:10 pm

Help creating a rotating carousels for those game launchers?

Get help with creating, editing & fixing problems with skins
StavrosPro
Posts: 20
Joined: April 6th, 2018, 6:11 pm

Re: Help creating a rotating carousels for those game launchers?

Post by StavrosPro »

balala wrote:You have to edit once again the previously edited two formulas. This time use the followings:

Code: Select all

[MeterLeft]
Meter=STRING
...
LeftMouseUpAction=[!SetVariable Pos "((#Pos#=0)?16:(#Pos#-1))"][!UpdateMeasure "MeasurePosition"][!UpdateMeterGroup "Buttons"]

...

[MeterRight]
Meter=STRING
...
LeftMouseUpAction=[!SetVariable Pos "((#Pos#+1)%17)"][!UpdateMeasure "MeasurePosition"][!UpdateMeterGroup "Buttons"]
Oh great, now I understand the concept of those formulas. Thanks for all your help man :)
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help creating a rotating carousels for those game launchers?

Post by balala »

In the meantime I made a few other changes to the code. If you're interested, here they are.
The basic idea was to can easily set up the number of the visible icons. I understand that you need just six icons right now, but what if later you'll want to change this number? The whole code should have to be rewritten in this case, which isn't the best idea.
So, I introduced a few new variables in the [Variables] section. NumOfIcons is the total number of icons (22), while NumOfVisibleIcons is the number of icons visible at a given moment (I set it to 6). Please add the following variables in the [Variables] section of your code, beside the existing variables (don't remove or modify them):

Code: Select all

[Variables]
...
NumOfIcons=22
NumOfVisibleIcons=6
Action1=!ShowMeter
Action2=!ShowMeter
Action3=!HideMeter
Action4=!HideMeter
Action5=!HideMeter
Action6=!HideMeter
Action7=!HideMeter
Action8=!HideMeter
Action9=!HideMeter
Action10=!HideMeter
Action11=!HideMeter
Action12=!HideMeter
Action13=!HideMeter
Action14=!HideMeter
Action15=!HideMeter
Action16=!HideMeter
Action17=!HideMeter
Action18=!HideMeter
Action19=!HideMeter
Action20=!HideMeter
Action21=!HideMeter
Action22=!HideMeter
Immediately we'll need the Action1 - Action22 variables as well.
Next step will be to add the following measure:

Code: Select all

[MeasureNumOfVisibleIcons]
Measure=Calc
Formula=( Clamp ( #NumOfVisibleIcons#, 2, 15))
IfCondition=(#CURRENTSECTION#=2)
IfTrueAction=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!HideMeter"][!SetVariable Action4 "!HideMeter"][!SetVariable Action5 "!HideMeter"][!SetVariable Action6 "!HideMeter"][!SetVariable Action7 "!HideMeter"][!SetVariable Action8 "!HideMeter"][!SetVariable Action9 "!HideMeter"][!SetVariable Action10 "!HideMeter"][!SetVariable Action11 "!HideMeter"][!SetVariable Action12 "!HideMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition2=(#CURRENTSECTION#=3)
IfTrueAction2=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!HideMeter"][!SetVariable Action5 "!HideMeter"][!SetVariable Action6 "!HideMeter"][!SetVariable Action7 "!HideMeter"][!SetVariable Action8 "!HideMeter"][!SetVariable Action9 "!HideMeter"][!SetVariable Action10 "!HideMeter"][!SetVariable Action11 "!HideMeter"][!SetVariable Action12 "!HideMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition3=(#CURRENTSECTION#=4)
IfTrueAction3=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!HideMeter"][!SetVariable Action6 "!HideMeter"][!SetVariable Action7 "!HideMeter"][!SetVariable Action8 "!HideMeter"][!SetVariable Action9 "!HideMeter"][!SetVariable Action10 "!HideMeter"][!SetVariable Action11 "!HideMeter"][!SetVariable Action12 "!HideMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition4=(#CURRENTSECTION#=5)
IfTrueAction4=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!HideMeter"][!SetVariable Action7 "!HideMeter"][!SetVariable Action8 "!HideMeter"][!SetVariable Action9 "!HideMeter"][!SetVariable Action10 "!HideMeter"][!SetVariable Action11 "!HideMeter"][!SetVariable Action12 "!HideMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition5=(#CURRENTSECTION#=6)
IfTrueAction5=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!ShowMeter"][!SetVariable Action7 "!HideMeter"][!SetVariable Action8 "!HideMeter"][!SetVariable Action9 "!HideMeter"][!SetVariable Action10 "!HideMeter"][!SetVariable Action11 "!HideMeter"][!SetVariable Action12 "!HideMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition6=(#CURRENTSECTION#=7)
IfTrueAction6=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!ShowMeter"][!SetVariable Action7 "!ShowMeter"][!SetVariable Action8 "!HideMeter"][!SetVariable Action9 "!HideMeter"][!SetVariable Action10 "!HideMeter"][!SetVariable Action11 "!HideMeter"][!SetVariable Action12 "!HideMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition7=(#CURRENTSECTION#=8)
IfTrueAction7=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!ShowMeter"][!SetVariable Action7 "!ShowMeter"][!SetVariable Action8 "!ShowMeter"][!SetVariable Action9 "!HideMeter"][!SetVariable Action10 "!HideMeter"][!SetVariable Action11 "!HideMeter"][!SetVariable Action12 "!HideMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition8=(#CURRENTSECTION#=9)
IfTrueAction8=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!ShowMeter"][!SetVariable Action7 "!ShowMeter"][!SetVariable Action8 "!ShowMeter"][!SetVariable Action9 "!ShowMeter"][!SetVariable Action10 "!HideMeter"][!SetVariable Action11 "!HideMeter"][!SetVariable Action12 "!HideMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition9=(#CURRENTSECTION#=10)
IfTrueAction9=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!ShowMeter"][!SetVariable Action7 "!ShowMeter"][!SetVariable Action8 "!ShowMeter"][!SetVariable Action9 "!ShowMeter"][!SetVariable Action10 "!ShowMeter"][!SetVariable Action11 "!HideMeter"][!SetVariable Action12 "!HideMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition10=(#CURRENTSECTION#=11)
IfTrueAction10=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!ShowMeter"][!SetVariable Action7 "!ShowMeter"][!SetVariable Action8 "!ShowMeter"][!SetVariable Action9 "!ShowMeter"][!SetVariable Action10 "!ShowMeter"][!SetVariable Action11 "!ShowMeter"][!SetVariable Action12 "!HideMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition11=(#CURRENTSECTION#=12)
IfTrueAction11=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!ShowMeter"][!SetVariable Action7 "!ShowMeter"][!SetVariable Action8 "!ShowMeter"][!SetVariable Action9 "!ShowMeter"][!SetVariable Action10 "!ShowMeter"][!SetVariable Action11 "!ShowMeter"][!SetVariable Action12 "!ShowMeter"][!SetVariable Action13 "!HideMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition12=(#CURRENTSECTION#=13)
IfTrueAction12=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!ShowMeter"][!SetVariable Action7 "!ShowMeter"][!SetVariable Action8 "!ShowMeter"][!SetVariable Action9 "!ShowMeter"][!SetVariable Action10 "!ShowMeter"][!SetVariable Action11 "!ShowMeter"][!SetVariable Action12 "!ShowMeter"][!SetVariable Action13 "!ShowMeter"][!SetVariable Action14 "!HideMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition13=(#CURRENTSECTION#=14)
IfTrueAction13=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!ShowMeter"][!SetVariable Action7 "!ShowMeter"][!SetVariable Action8 "!ShowMeter"][!SetVariable Action9 "!ShowMeter"][!SetVariable Action10 "!ShowMeter"][!SetVariable Action11 "!ShowMeter"][!SetVariable Action12 "!ShowMeter"][!SetVariable Action13 "!ShowMeter"][!SetVariable Action14 "!ShowMeter"][!SetVariable Action15 "!HideMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
IfCondition14=(#CURRENTSECTION#=15)
IfTrueAction14=[!SetVariable Action1 "!ShowMeter"][!SetVariable Action2 "!ShowMeter"][!SetVariable Action3 "!ShowMeter"][!SetVariable Action4 "!ShowMeter"][!SetVariable Action5 "!ShowMeter"][!SetVariable Action6 "!ShowMeter"][!SetVariable Action7 "!ShowMeter"][!SetVariable Action8 "!ShowMeter"][!SetVariable Action9 "!ShowMeter"][!SetVariable Action10 "!ShowMeter"][!SetVariable Action11 "!ShowMeter"][!SetVariable Action12 "!ShowMeter"][!SetVariable Action13 "!ShowMeter"][!SetVariable Action14 "!ShowMeter"][!SetVariable Action15 "!ShowMeter"][!SetVariable Action16 "!HideMeter"][!SetVariable Action17 "!HideMeter"][!SetVariable Action18 "!HideMeter"][!SetVariable Action19 "!HideMeter"][!SetVariable Action20 "!HideMeter"][!SetVariable Action21 "!HideMeter"][!SetVariable Action22 "!HideMeter"][!UpdateMeasure "MeasurePosition"]
Don't worry if you can't follow what this measure does. I don't say it would be easy.
The [MeasurePosition] measure will also have to be modified. Replace it with the following one:

Code: Select all

[MeasurePosition]
Measure=Calc
Formula=#Pos#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[#Action1# "MeterIcon1"][#Action2# "MeterIcon2"][#Action3# "MeterIcon3"][#Action4# "MeterIcon4"][#Action5# "MeterIcon5"][#Action6# "MeterIcon6"][#Action7# "MeterIcon7"][#Action8# "MeterIcon8"][#Action9# "MeterIcon9"][#Action10# "MeterIcon10"][#Action11# "MeterIcon11"][#Action12# "MeterIcon12"][#Action13# "MeterIcon13"][#Action14# "MeterIcon14"][#Action15# "MeterIcon15"][#Action16# "MeterIcon16"][#Action17# "MeterIcon17"][#Action18# "MeterIcon18"][#Action19# "MeterIcon19"][#Action20# "MeterIcon20"][#Action21# "MeterIcon21"][#Action22# "MeterIcon22"][!Redraw]
IfCondition2=(#CURRENTSECTION#=1)
IfTrueAction2=[#Action22# "MeterIcon1"][#Action1# "MeterIcon2"][#Action2# "MeterIcon3"][#Action3# "MeterIcon4"][#Action4# "MeterIcon5"][#Action5# "MeterIcon6"][#Action6# "MeterIcon7"][#Action7# "MeterIcon8"][#Action8# "MeterIcon9"][#Action9# "MeterIcon10"][#Action10# "MeterIcon11"][#Action11# "MeterIcon12"][#Action12# "MeterIcon13"][#Action13# "MeterIcon14"][#Action14# "MeterIcon15"][#Action15# "MeterIcon16"][#Action16# "MeterIcon17"][#Action17# "MeterIcon18"][#Action18# "MeterIcon19"][#Action19# "MeterIcon20"][#Action20# "MeterIcon21"][#Action21# "MeterIcon22"][!Redraw]
IfCondition3=(#CURRENTSECTION#=2)
IfTrueAction3=[#Action21# "MeterIcon1"][#Action22# "MeterIcon2"][#Action1# "MeterIcon3"][#Action2# "MeterIcon4"][#Action3# "MeterIcon5"][#Action4# "MeterIcon6"][#Action5# "MeterIcon7"][#Action6# "MeterIcon8"][#Action7# "MeterIcon9"][#Action8# "MeterIcon10"][#Action9# "MeterIcon11"][#Action10# "MeterIcon12"][#Action11# "MeterIcon13"][#Action12# "MeterIcon14"][#Action13# "MeterIcon15"][#Action14# "MeterIcon16"][#Action15# "MeterIcon17"][#Action16# "MeterIcon18"][#Action17# "MeterIcon19"][#Action18# "MeterIcon20"][#Action19# "MeterIcon21"][#Action20# "MeterIcon22"][!Redraw]
IfCondition4=(#CURRENTSECTION#=3)
IfTrueAction4=[#Action20# "MeterIcon1"][#Action21# "MeterIcon2"][#Action22# "MeterIcon3"][#Action1# "MeterIcon4"][#Action2# "MeterIcon5"][#Action3# "MeterIcon6"][#Action4# "MeterIcon7"][#Action5# "MeterIcon8"][#Action6# "MeterIcon9"][#Action7# "MeterIcon10"][#Action8# "MeterIcon11"][#Action9# "MeterIcon12"][#Action10# "MeterIcon13"][#Action11# "MeterIcon14"][#Action12# "MeterIcon15"][#Action13# "MeterIcon16"][#Action14# "MeterIcon17"][#Action15# "MeterIcon18"][#Action16# "MeterIcon19"][#Action17# "MeterIcon20"][#Action18# "MeterIcon21"][#Action19# "MeterIcon22"][!Redraw]
IfCondition5=(#CURRENTSECTION#=4)
IfTrueAction5=[#Action19# "MeterIcon1"][#Action20# "MeterIcon2"][#Action21# "MeterIcon3"][#Action22# "MeterIcon4"][#Action1# "MeterIcon5"][#Action2# "MeterIcon6"][#Action3# "MeterIcon7"][#Action4# "MeterIcon8"][#Action5# "MeterIcon9"][#Action6# "MeterIcon10"][#Action7# "MeterIcon11"][#Action8# "MeterIcon12"][#Action9# "MeterIcon13"][#Action10# "MeterIcon14"][#Action11# "MeterIcon15"][#Action12# "MeterIcon16"][#Action13# "MeterIcon17"][#Action14# "MeterIcon18"][#Action15# "MeterIcon19"][#Action16# "MeterIcon20"][#Action17# "MeterIcon21"][#Action18# "MeterIcon22"][!Redraw]
IfCondition6=(#CURRENTSECTION#=5)
IfTrueAction6=[#Action18# "MeterIcon1"][#Action19# "MeterIcon2"][#Action20# "MeterIcon3"][#Action21# "MeterIcon4"][#Action22# "MeterIcon5"][#Action1# "MeterIcon6"][#Action2# "MeterIcon7"][#Action3# "MeterIcon8"][#Action4# "MeterIcon9"][#Action5# "MeterIcon10"][#Action6# "MeterIcon11"][#Action7# "MeterIcon12"][#Action8# "MeterIcon13"][#Action9# "MeterIcon14"][#Action10# "MeterIcon15"][#Action11# "MeterIcon16"][#Action12# "MeterIcon17"][#Action13# "MeterIcon18"][#Action14# "MeterIcon19"][#Action15# "MeterIcon20"][#Action16# "MeterIcon21"][#Action17# "MeterIcon22"][!Redraw]
IfCondition7=(#CURRENTSECTION#=6)
IfTrueAction7=[#Action17# "MeterIcon1"][#Action18# "MeterIcon2"][#Action19# "MeterIcon3"][#Action20# "MeterIcon4"][#Action21# "MeterIcon5"][#Action22# "MeterIcon6"][#Action1# "MeterIcon7"][#Action2# "MeterIcon8"][#Action3# "MeterIcon9"][#Action4# "MeterIcon10"][#Action5# "MeterIcon11"][#Action6# "MeterIcon12"][#Action7# "MeterIcon13"][#Action8# "MeterIcon14"][#Action9# "MeterIcon15"][#Action10# "MeterIcon16"][#Action11# "MeterIcon17"][#Action12# "MeterIcon18"][#Action13# "MeterIcon19"][#Action14# "MeterIcon20"][#Action15# "MeterIcon21"][#Action16# "MeterIcon22"][!Redraw]
IfCondition8=(#CURRENTSECTION#=7)
IfTrueAction8=[#Action16# "MeterIcon1"][#Action17# "MeterIcon2"][#Action18# "MeterIcon3"][#Action19# "MeterIcon4"][#Action20# "MeterIcon5"][#Action21# "MeterIcon6"][#Action22# "MeterIcon7"][#Action1# "MeterIcon8"][#Action2# "MeterIcon9"][#Action3# "MeterIcon10"][#Action4# "MeterIcon11"][#Action5# "MeterIcon12"][#Action6# "MeterIcon13"][#Action7# "MeterIcon14"][#Action8# "MeterIcon15"][#Action9# "MeterIcon16"][#Action10# "MeterIcon17"][#Action11# "MeterIcon18"][#Action12# "MeterIcon19"][#Action13# "MeterIcon20"][#Action14# "MeterIcon21"][#Action15# "MeterIcon22"][!Redraw]
IfCondition9=(#CURRENTSECTION#=8)
IfTrueAction9=[#Action15# "MeterIcon1"][#Action16# "MeterIcon2"][#Action17# "MeterIcon3"][#Action18# "MeterIcon4"][#Action19# "MeterIcon5"][#Action20# "MeterIcon6"][#Action21# "MeterIcon7"][#Action22# "MeterIcon8"][#Action1# "MeterIcon9"][#Action2# "MeterIcon10"][#Action3# "MeterIcon11"][#Action4# "MeterIcon12"][#Action5# "MeterIcon13"][#Action6# "MeterIcon14"][#Action7# "MeterIcon15"][#Action8# "MeterIcon16"][#Action9# "MeterIcon17"][#Action10# "MeterIcon18"][#Action11# "MeterIcon19"][#Action12# "MeterIcon20"][#Action13# "MeterIcon21"][#Action14# "MeterIcon22"][!Redraw]
IfCondition10=(#CURRENTSECTION#=9)
IfTrueAction10=[#Action14# "MeterIcon1"][#Action15# "MeterIcon2"][#Action16# "MeterIcon3"][#Action17# "MeterIcon4"][#Action18# "MeterIcon5"][#Action19# "MeterIcon6"][#Action20# "MeterIcon7"][#Action21# "MeterIcon8"][#Action22# "MeterIcon9"][#Action1# "MeterIcon10"][#Action2# "MeterIcon11"][#Action3# "MeterIcon12"][#Action4# "MeterIcon13"][#Action5# "MeterIcon14"][#Action6# "MeterIcon15"][#Action7# "MeterIcon16"][#Action8# "MeterIcon17"][#Action9# "MeterIcon18"][#Action10# "MeterIcon19"][#Action11# "MeterIcon20"][#Action12# "MeterIcon21"][#Action13# "MeterIcon22"][!Redraw]
IfCondition11=(#CURRENTSECTION#=10)
IfTrueAction11=[#Action13# "MeterIcon1"][#Action14# "MeterIcon2"][#Action15# "MeterIcon3"][#Action16# "MeterIcon4"][#Action17# "MeterIcon5"][#Action18# "MeterIcon6"][#Action19# "MeterIcon7"][#Action20# "MeterIcon8"][#Action21# "MeterIcon9"][#Action22# "MeterIcon10"][#Action1# "MeterIcon11"][#Action2# "MeterIcon12"][#Action3# "MeterIcon13"][#Action4# "MeterIcon14"][#Action5# "MeterIcon15"][#Action6# "MeterIcon16"][#Action7# "MeterIcon17"][#Action8# "MeterIcon18"][#Action9# "MeterIcon19"][#Action10# "MeterIcon20"][#Action11# "MeterIcon21"][#Action12# "MeterIcon22"][!Redraw]
IfCondition12=(#CURRENTSECTION#=11)
IfTrueAction12=[#Action12# "MeterIcon1"][#Action13# "MeterIcon2"][#Action14# "MeterIcon3"][#Action15# "MeterIcon4"][#Action16# "MeterIcon5"][#Action17# "MeterIcon6"][#Action18# "MeterIcon7"][#Action19# "MeterIcon8"][#Action20# "MeterIcon9"][#Action21# "MeterIcon10"][#Action22# "MeterIcon11"][#Action1# "MeterIcon12"][#Action2# "MeterIcon13"][#Action3# "MeterIcon14"][#Action4# "MeterIcon15"][#Action5# "MeterIcon16"][#Action6# "MeterIcon17"][#Action7# "MeterIcon18"][#Action8# "MeterIcon19"][#Action9# "MeterIcon20"][#Action10# "MeterIcon21"][#Action11# "MeterIcon22"][!Redraw]
IfCondition13=(#CURRENTSECTION#=12)
IfTrueAction13=[#Action11# "MeterIcon1"][#Action12# "MeterIcon2"][#Action13# "MeterIcon3"][#Action14# "MeterIcon4"][#Action15# "MeterIcon5"][#Action16# "MeterIcon6"][#Action17# "MeterIcon7"][#Action18# "MeterIcon8"][#Action19# "MeterIcon9"][#Action20# "MeterIcon10"][#Action21# "MeterIcon11"][#Action22# "MeterIcon12"][#Action1# "MeterIcon13"][#Action2# "MeterIcon14"][#Action3# "MeterIcon15"][#Action4# "MeterIcon16"][#Action5# "MeterIcon17"][#Action6# "MeterIcon18"][#Action7# "MeterIcon19"][#Action8# "MeterIcon20"][#Action9# "MeterIcon21"][#Action10# "MeterIcon22"][!Redraw]
IfCondition14=(#CURRENTSECTION#=13)
IfTrueAction14=[#Action10# "MeterIcon1"][#Action11# "MeterIcon2"][#Action12# "MeterIcon3"][#Action13# "MeterIcon4"][#Action14# "MeterIcon5"][#Action15# "MeterIcon6"][#Action16# "MeterIcon7"][#Action17# "MeterIcon8"][#Action18# "MeterIcon9"][#Action19# "MeterIcon10"][#Action20# "MeterIcon11"][#Action21# "MeterIcon12"][#Action22# "MeterIcon13"][#Action1# "MeterIcon14"][#Action2# "MeterIcon15"][#Action3# "MeterIcon16"][#Action4# "MeterIcon17"][#Action5# "MeterIcon18"][#Action6# "MeterIcon19"][#Action7# "MeterIcon20"][#Action8# "MeterIcon21"][#Action9# "MeterIcon22"][!Redraw]
IfCondition15=(#CURRENTSECTION#=14)
IfTrueAction15=[#Action9# "MeterIcon1"][#Action10# "MeterIcon2"][#Action11# "MeterIcon3"][#Action12# "MeterIcon4"][#Action13# "MeterIcon5"][#Action14# "MeterIcon6"][#Action15# "MeterIcon7"][#Action16# "MeterIcon8"][#Action17# "MeterIcon9"][#Action18# "MeterIcon10"][#Action19# "MeterIcon11"][#Action20# "MeterIcon12"][#Action21# "MeterIcon13"][#Action22# "MeterIcon14"][#Action1# "MeterIcon15"][#Action2# "MeterIcon16"][#Action3# "MeterIcon17"][#Action4# "MeterIcon18"][#Action5# "MeterIcon19"][#Action6# "MeterIcon20"][#Action7# "MeterIcon21"][#Action8# "MeterIcon22"][!Redraw]
IfCondition16=(#CURRENTSECTION#=15)
IfTrueAction16=[#Action8# "MeterIcon1"][#Action9# "MeterIcon2"][#Action10# "MeterIcon3"][#Action11# "MeterIcon4"][#Action12# "MeterIcon5"][#Action13# "MeterIcon6"][#Action14# "MeterIcon7"][#Action15# "MeterIcon8"][#Action16# "MeterIcon9"][#Action17# "MeterIcon10"][#Action18# "MeterIcon11"][#Action19# "MeterIcon12"][#Action20# "MeterIcon13"][#Action21# "MeterIcon14"][#Action22# "MeterIcon15"][#Action1# "MeterIcon16"][#Action2# "MeterIcon17"][#Action3# "MeterIcon18"][#Action4# "MeterIcon19"][#Action5# "MeterIcon20"][#Action6# "MeterIcon21"][#Action7# "MeterIcon22"][!Redraw]
IfCondition17=(#CURRENTSECTION#=16)
IfTrueAction17=[#Action7# "MeterIcon1"][#Action8# "MeterIcon2"][#Action9# "MeterIcon3"][#Action10# "MeterIcon4"][#Action11# "MeterIcon5"][#Action12# "MeterIcon6"][#Action13# "MeterIcon7"][#Action14# "MeterIcon8"][#Action15# "MeterIcon9"][#Action16# "MeterIcon10"][#Action17# "MeterIcon11"][#Action18# "MeterIcon12"][#Action19# "MeterIcon13"][#Action20# "MeterIcon14"][#Action21# "MeterIcon15"][#Action22# "MeterIcon16"][#Action1# "MeterIcon17"][#Action2# "MeterIcon18"][#Action3# "MeterIcon19"][#Action4# "MeterIcon20"][#Action5# "MeterIcon21"][#Action6# "MeterIcon22"][!Redraw]
IfCondition18=(#CURRENTSECTION#=17)
IfTrueAction18=[#Action6# "MeterIcon1"][#Action7# "MeterIcon2"][#Action8# "MeterIcon3"][#Action9# "MeterIcon4"][#Action10# "MeterIcon5"][#Action11# "MeterIcon6"][#Action12# "MeterIcon7"][#Action13# "MeterIcon8"][#Action14# "MeterIcon9"][#Action15# "MeterIcon10"][#Action16# "MeterIcon11"][#Action17# "MeterIcon12"][#Action18# "MeterIcon13"][#Action19# "MeterIcon14"][#Action20# "MeterIcon15"][#Action21# "MeterIcon16"][#Action22# "MeterIcon17"][#Action1# "MeterIcon18"][#Action2# "MeterIcon19"][#Action3# "MeterIcon20"][#Action4# "MeterIcon21"][#Action5# "MeterIcon22"][!Redraw]
IfCondition19=(#CURRENTSECTION#=18)
IfTrueAction19=[#Action5# "MeterIcon1"][#Action6# "MeterIcon2"][#Action7# "MeterIcon3"][#Action8# "MeterIcon4"][#Action9# "MeterIcon5"][#Action10# "MeterIcon6"][#Action11# "MeterIcon7"][#Action12# "MeterIcon8"][#Action13# "MeterIcon9"][#Action14# "MeterIcon10"][#Action15# "MeterIcon11"][#Action16# "MeterIcon12"][#Action17# "MeterIcon13"][#Action18# "MeterIcon14"][#Action19# "MeterIcon15"][#Action20# "MeterIcon16"][#Action21# "MeterIcon17"][#Action22# "MeterIcon18"][#Action1# "MeterIcon19"][#Action2# "MeterIcon20"][#Action3# "MeterIcon21"][#Action4# "MeterIcon22"][!Redraw]
OnChangeAction=[!UpdateMeter "Uptime"][!Redraw]
IfCondition20=(#CURRENTSECTION#=19)
IfTrueAction20=[#Action4# "MeterIcon1"][#Action5# "MeterIcon2"][#Action6# "MeterIcon3"][#Action7# "MeterIcon4"][#Action8# "MeterIcon5"][#Action9# "MeterIcon6"][#Action10# "MeterIcon7"][#Action11# "MeterIcon8"][#Action12# "MeterIcon9"][#Action13# "MeterIcon10"][#Action14# "MeterIcon11"][#Action15# "MeterIcon12"][#Action16# "MeterIcon13"][#Action17# "MeterIcon14"][#Action18# "MeterIcon15"][#Action19# "MeterIcon16"][#Action20# "MeterIcon17"][#Action21# "MeterIcon18"][#Action22# "MeterIcon19"][#Action1# "MeterIcon20"][#Action2# "MeterIcon21"][#Action3# "MeterIcon22"][!Redraw]
IfCondition21=(#CURRENTSECTION#=20)
IfTrueAction21=[#Action3# "MeterIcon1"][#Action4# "MeterIcon2"][#Action5# "MeterIcon3"][#Action6# "MeterIcon4"][#Action7# "MeterIcon5"][#Action8# "MeterIcon6"][#Action9# "MeterIcon7"][#Action10# "MeterIcon8"][#Action11# "MeterIcon9"][#Action12# "MeterIcon10"][#Action13# "MeterIcon11"][#Action14# "MeterIcon12"][#Action15# "MeterIcon13"][#Action16# "MeterIcon14"][#Action17# "MeterIcon15"][#Action18# "MeterIcon16"][#Action19# "MeterIcon17"][#Action20# "MeterIcon18"][#Action21# "MeterIcon19"][#Action22# "MeterIcon20"][#Action1# "MeterIcon21"][#Action2# "MeterIcon22"][!Redraw]
IfCondition22=(#CURRENTSECTION#=21)
IfTrueAction22=[#Action2# "MeterIcon1"][#Action3# "MeterIcon2"][#Action4# "MeterIcon3"][#Action5# "MeterIcon4"][#Action6# "MeterIcon5"][#Action7# "MeterIcon6"][#Action8# "MeterIcon7"][#Action9# "MeterIcon8"][#Action10# "MeterIcon9"][#Action11# "MeterIcon10"][#Action12# "MeterIcon11"][#Action13# "MeterIcon12"][#Action14# "MeterIcon13"][#Action15# "MeterIcon14"][#Action16# "MeterIcon15"][#Action17# "MeterIcon16"][#Action18# "MeterIcon17"][#Action19# "MeterIcon18"][#Action20# "MeterIcon19"][#Action21# "MeterIcon20"][#Action22# "MeterIcon21"][#Action1# "MeterIcon22"][!Redraw]
DynamicVariables=1
The last thing you have to do is to modify (again!) the formulas used on the LeftMouseUpAction options of the [MeterLeft] and [MeterRight] meters. Use the following options:

Code: Select all

[MeterLeft]
Meter=STRING
...
LeftMouseUpAction=[!SetVariable Pos "((#Pos#=0)?(#NumOfIcons#-#NumOfVisibleIcons#):(#Pos#-1))"][!UpdateMeasure "MeasurePosition"][!UpdateMeterGroup "Buttons"]

...

[MeterRight]
Meter=STRING
...
LeftMouseUpAction=[!SetVariable Pos "((#Pos#+1)%(#NumOfIcons#-#NumOfVisibleIcons#+1))"][!UpdateMeasure "MeasurePosition"][!UpdateMeterGroup "Buttons"]
After applying all these, you can set up the number of visible icons through the NumOfVisibleIcons variable. According to the formula of the [MeasureNumOfVisibleIcons] measure, this number is limited between 2 and 15 (so you can't have less icons then 2 or more then 15).
Please give a try to this changes and let me know if it does its job well.
StavrosPro
Posts: 20
Joined: April 6th, 2018, 6:11 pm

Re: Help creating a rotating carousels for those game launchers?

Post by StavrosPro »

balala wrote:In the meantime I made a few other changes to the code. If you're interested, here they are.
The basic idea was to can easily set up the number of the visible icons. I understand that you need just six icons right now, but what if later you'll want to change this number? The whole code should have to be rewritten in this case, which isn't the best idea.
So, I introduced a few new variables in the [Variables] section. NumOfIcons is the total number of icons (22), while NumOfVisibleIcons is the number of icons visible at a given moment (I set it to 6). Please add the following variables in the [Variables] section of your code, beside the existing variables (don't remove or modify them).
Thanks for the input. It's pretty great you took the time to put all this work on this but I don't think I will need this. The only change to the code that could be useful would be to support further additions of games without too much editing. I added 9 more games today and I am on this for hours editing the code and adding conditions and stuff.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help creating a rotating carousels for those game launchers?

Post by balala »

StavrosPro wrote:I don't think I will need this.
As you wish. Anyway, it was interesting thing to make it to work.
StavrosPro wrote:The only change to the code that could be useful would be to support further additions of games without too much editing. I added 9 more games today and I am on this for hours editing the code and adding conditions and stuff.
Did you succeed?
StavrosPro
Posts: 20
Joined: April 6th, 2018, 6:11 pm

Re: Help creating a rotating carousels for those game launchers?

Post by StavrosPro »

balala wrote:As you wish. Anyway, it was interesting thing to make it to work.

Did you succeed?
Well no, I haven't really tried since I am not really good at this. I will probably have to live with it I guess.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help creating a rotating carousels for those game launchers?

Post by balala »

StavrosPro wrote:Well no, I haven't really tried since I am not really good at this. I will probably have to live with it I guess.
Or post what you'd like. Maybe I (or someone else) will be able to help you.
StavrosPro
Posts: 20
Joined: April 6th, 2018, 6:11 pm

Re: Help creating a rotating carousels for those game launchers?

Post by StavrosPro »

balala wrote:Or post what you'd like. Maybe I (or someone else) will be able to help you.
Well, what I need is a code that needs the least editing when I am adding new games to the total launchers. I don't have any ideas in my mind on how this could work.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help creating a rotating carousels for those game launchers?

Post by balala »

StavrosPro wrote:Well, what I need is a code that needs the least editing when I am adding new games to the total launchers. I don't have any ideas in my mind on how this could work.
Probably first you should have to add the appropriate Image meters, after the [MeterIcon22] icon (is important to add them immediately after this meter, because they are relatively positioned, which means it does matter where they are).
Then you should have to add the appropriate !SHowMeter / !HideMeter bangs to each IfTrueAction option of the [MeasurePosition] measure. Finally the last step should have to be the rewriting of the formulas used in the LeftMouseUpAction options of the [MeterLeft] and [MeterRight] meters.
StavrosPro
Posts: 20
Joined: April 6th, 2018, 6:11 pm

Re: Help creating a rotating carousels for those game launchers?

Post by StavrosPro »

balala wrote:Probably first you should have to add the appropriate Image meters, after the [MeterIcon22] icon (is important to add them immediately after this meter, because they are relatively positioned, which means it does matter where they are).
Then you should have to add the appropriate !SHowMeter / !HideMeter bangs to each IfTrueAction option of the [MeasurePosition] measure. Finally the last step should have to be the rewriting of the formulas used in the LeftMouseUpAction options of the [MeterLeft] and [MeterRight] meters.
Well yeah this is what I am doing right now, this is the long editing I was talking about.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help creating a rotating carousels for those game launchers?

Post by balala »

StavrosPro wrote:this is the long editing I was talking about.
Do you have any concrete question?