I have a skin that shows a random gif animation every 1000 milliseconds but I would also like it to show a specific gif on certain days (e.g. show a Christmas themed gif on Christmas day).
I have it setup up with a measure that counts how many images are within the gif's folder so it can automatically calculate the frame count which works nicely.
I feel like I'm close to getting it but I'm doing something wrong.
The code so far:
I have it setup up with a measure that counts how many images are within the gif's folder so it can automatically calculate the frame count which works nicely.
I feel like I'm close to getting it but I'm doing something wrong.
The code so far:
Code:
[Rainmeter]Update=60DynamicWindowSize=1AccurateText=1[Variables]@Include=C:\Users\dpsro\Documents\Rainmeter\Skins\DR\@DR_RES\VAR.inigif=27;======================= MEASURES ====================[MeasureRand]; Random number calculatorMeasure=CalcFormula=(Random)LowBound=13HighBound=71DynamicVariables=0[MeasureFileCount]; Counts number of image files in folder to give correct frame countMeasure=PluginPlugin=FolderInfoFolder=#@#Images\#gif#InfoType=FileCountDynamicVariables=1[MeasureCounter]; Animation frame calcMeasure=CalcGroup=CountersDisabled=1Formula=Counter % MeasureFileCountDynamicVariables=1;===============================================================================================================================[MeterImage]Meter=ImageImageName=#@#Images\#gif#\Frame[MeasureCounter].pngX=5Y=5w=300h=224DynamicVariables=1PreserveAspectRatio=1LeftMouseDownAction=!Execute [!UpdateMeter *][!Refresh][MeasureThing]; Auto skin refresh calcMeasure=CalcFormula=(MeasureThing+1)%(1000)IfBelowValue=1IfBelowAction=!Execute [!UpdateMeter *][!Refresh]DynamicVariables=1;===============================================================================================================================[Measuregifrand]; Shows random gifGroup=CountersMeasure=TimeFormat=%dDynamicVariables=0UpdateDivider=-1IfMatchMode=1;--TEST DATE MATCHIfMatch=01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31IfMatchAction=[!SetVariable gif [MeasureRand]][!WriteKeyValue Variables gif [MeasureRand]][!EnableMeasureGroup Counters][MeasureGif_yearly]; Shows specific gif on date matchGroup=CountersMeasure=TimeFormat=%d.%mDynamicVariables=1UpdateDivider=-1IfMatchMode=1;xmas Christmas DayIfMatch2=25.10IfMatchAction2=[!SetVariable gif 0][!WriteKeyValue Variables gif 0];nyd New Years DayIfMatch3=01.01IfMatchAction3=[!SetVariable gif 3][!WriteKeyValue Variables gif 3];BdayIfMatch4=21.10IfMatchAction4=[!SetVariable gif 12][!WriteKeyValue Variables gif 12];Box Boxing DayIfMatch5=26.12IfMatchAction5=[!SetVariable gif 4][!WriteKeyValue Variables gif 4];fw Fireworks nightIfMatch6=05.11IfMatchAction6=[!SetVariable gif 7][!WriteKeyValue Variables gif 7];hw HalloweenIfMatch7=31.10IfMatchAction7=[!SetVariable gif 1][!WriteKeyValue Variables gif 1];nyeIfMatch8=31.12IfMatchAction8=[!SetVariable gif 5][!WriteKeyValue Variables gif 5];xmeIfMatch9=24.12IfMatchAction9=[!SetVariable gif 6][!WriteKeyValue Variables gif 6];=================================================================================================================================[MeasureGif_varied]; Shows specific gif on date matchGroup=CountersMeasure=TimeFormat=%d.%m.%YDynamicVariables=1UpdateDivider=-1IfMatchMode=1;-----Good FridayIfMatch=07.04.2023|29.03.2024|18.04.2025|03.04.2026|26.03.2027|14.04.2028|30.03.2029|19.04.2030|11.04.2031|26.03.2032|15.04.2033IfMatchAction=[!SetVariable gif 8][!WriteKeyValue Variables gif 8]; ----Easter SundayIfMatch2=09.04.2023|31.03.2024|20.04.2025|05.04.2026|28.03.2027|16.04.2028|01.04.2029|21.04.2030|13.04.2031|28.03.2032|17.04.2033IfMatchAction2=[!SetVariable gif 9][!WriteKeyValue Variables gif 9]; ----Bank HolidayIfMatch3=02.09.2023|06.05.2024|05.05.2025|04.05.2026|03.05.2027|01.05.2028|07.05.2029|06.05.2030|05.05.2031|03.05.2032|02.05.2033|29.05.2023|27.05.2024|26.05.2025|25.05.2026|31.05.2027|29.05.2028|28.05.2029|27.05.2030|26.05.2031|31.05.2032|30.05.2033|28.08.2023|26.08.2024|25.08.2025|31.08.2026|30.08.2027|29.08.2028|27.08.2029|26.08.2030|25.08.2031|30.08.2032|29.08.2033|02.01.2023|10.04.2023|01.04.2024|21.04.2025|06.04.2026|28.12.2026|29.03.2027|27.12.2027|28.12.2027|03.01.2028|17.04.2028|02.04.2029|02.04.2030|22.04.2031|14.04.2032|27.12.2033|28.12.2023IfMatchAction3=[!SetVariable gif 2][!WriteKeyValue Variables gif 2];-----longest dayIfMatch4=21.06.2023|20.06.2024|21.06.2025|21.06.2026|21.06.2027|20.06.2028|21.06.2029|21.06.2030|21.06.2031|20.06.2032|21.06.2033IfMatchAction4=[!SetVariable gif 10][!WriteKeyValue Variables gif 10];-----shortest dayIfMatch5=22.12.2023|21.12.2024|21.12.2025|21.12.2026|22.12.2027|21.12.2028|21.12.2029|21.12.2030|22.12.2031|21.12.2032|21.12.2033IfMatchAction5=[!SetVariable gif 11][!WriteKeyValue Variables gif 11];==============Meters===========================================================================================================[MainBackground]Meter=IMAGESolidColor=#BC#Y=0w=310H=234
Statistics: Posted by dooey123 — Yesterday, 7:28 pm — Replies 2 — Views 51