It is currently March 28th, 2024, 11:35 pm

Two little questions about a little skin

Get help with creating, editing & fixing problems with skins
ebennetthill
Posts: 6
Joined: January 14th, 2017, 2:19 am

Two little questions about a little skin

Post by ebennetthill »

I have a little skin that shows a photo on my desktop. It shows one image a day and cycles through the images. I like it.

Code: Select all

[Rainmeter]
DynamicWindowSize=1
Update=-1

[Variables]
1=Bloomfield.png
2=Bob and Ali.png
3=Carter Family.png
4=Coltrane.png
5=Dolly and Porter.png
6=Faerie.png
7=Felix.png
8=Grace Kelly.png
9=James Brown.png
10=Little Richard.png
11=Mark Twain.png
12=Mr. Natural.png
13=Peter O'Toole.png
14=Robert Johnson.png
15=Wanda Jackson.png
16=Wilt Chamberlain HS.png
17=Woodstock Bob.png

Name=[DayCalc]

[Day]
Measure=Time
Format=%j

[DayCalc]
Measure=Calc
Formula=([Day]%17+1)

Substitute="17":"#17#","16":"#16#","15":"#15#","14":"#14#","13":"#13#","12":"#12#","11":"#11#","10":"#10#","9":"#9#","8":"#8#","7":"#7#","6":"#6#","5":"#5#","4":"#4#","3":"#3#","2":"#2#","1":"#1#"

[Image]
Meter=Image
ImageName="#CURRENTPATH#Images\#Name#"
H=400
X=0
Y=0
Greyscale=1
ImageAlpha=100
PreserveAspectRatio=1
DynamicVariables=1
Question 1: Is there a better, simpler, more elegant to cycle through without the long Substitute in the [DayCalc] measure? I'm just curious. This works, but coders around here are getting more and more sophisticated, and if I happened to want to have 50 images, it would be annoying to have such a long Substitute, right?

Question 2: Is there a way to have a LeftMouseUpAction that would cycle through the images just to view them? And then if I wanted to go back to the day's image, I could refresh the skin.
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Two little questions about a little skin

Post by CyberTheWorm »

Well you can always rename the images to 1.png, 2.png etc that way you don't need the variable section then do something like this

Code: Select all

[MeasureDayNumber]
Measure=Time
Format=%e

[MeterImage]
Meter=Image
MeasureName=MeasureDayNumber
ImagePath=#@#Images\
ImageName=%1
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
ebennetthill
Posts: 6
Joined: January 14th, 2017, 2:19 am

Re: Two little questions about a little skin

Post by ebennetthill »

Thanks, I'll think about that.