I'm making a clock (surprise, surprise!) essentially inspired by Corner Clock, but with a font I like better and the option for vertical or inverted numbers to support more positions. Unlike Corner Clock, I also want to have the dials rotate in real time instead of just jump to the next image.
The problem I am facing is that I can't get the Rotator meter to display an image whose file name is generated from a measure, and I can't get the Image meter to change the rotation based on a measure. Certainly one of these must be possible... can someone help me out?
Edit: Totally just saw the "Rainmeter Help" board, sorry. A move would be nice.
It is currently April 26th, 2024, 11:22 am
Rotator with dynamic image or Image with dynamic rotation?
-
- Posts: 5
- Joined: January 22nd, 2011, 1:07 am
-
- Posts: 667
- Joined: April 18th, 2010, 2:16 pm
- Location: NY, USA
Re: Rotator with dynamic image or Image with dynamic rotatio
Post your code?
Make sure your ImageName=[SomeMeasure] has the brackets and you have DynamicVariables=1 for that meter.
Make sure your ImageName=[SomeMeasure] has the brackets and you have DynamicVariables=1 for that meter.
-
- Posts: 5
- Joined: January 22nd, 2011, 1:07 am
Re: Rotator with dynamic image or Image with dynamic rotatio
I used the % symbols instead of measure names.
For the Image:
For the Rotator:
I'm probably doing my ImageRotate wrong, aren't I. Although I tried to use DynamicVariables I failed miserably.
For the Image:
Code: Select all
[hourmeter]
Meter=Image
MeasureName=hourmeasure
ImageName=%1.png
X=0
Y=0
W=360
H=360
Antialias=1
ImageRotate=(%1 * 12)
Code: Select all
[hourmeter]
Meter=Rotator
MeasureName=hourmeasure
ImageName=%1.png
[..rotating stuff as usual..]
-
- Posts: 667
- Joined: April 18th, 2010, 2:16 pm
- Location: NY, USA
Re: Rotator with dynamic image or Image with dynamic rotatio
I never even thought of getting an image name like that.
Theoretically, it should work.
For the rotator meter, you're having it rotate according to hourmeasure AND the image name=hourmeasure.
Is that how you want it to be?
Could you paste the full cod, or at least the hourmeasure?
[Edit] Basically, how you have it set up now is you have your Meter=Image is that you have a different image (1,2,4,5,etc) being used on the hour, and then rotating at #hour# * 12. (So, 12, 24, 36, etc)
And for Meter=Rotator you also have the image names equal to 1, 2, 3, etc.
If you have the measure=time in a format that's not numbers, you'll have a problem here.
Theoretically, it should work.
For the rotator meter, you're having it rotate according to hourmeasure AND the image name=hourmeasure.
Is that how you want it to be?
Could you paste the full cod, or at least the hourmeasure?
[Edit] Basically, how you have it set up now is you have your Meter=Image is that you have a different image (1,2,4,5,etc) being used on the hour, and then rotating at #hour# * 12. (So, 12, 24, 36, etc)
And for Meter=Rotator you also have the image names equal to 1, 2, 3, etc.
If you have the measure=time in a format that's not numbers, you'll have a problem here.
-
- Rainmeter Sage
- Posts: 642
- Joined: July 19th, 2009, 5:59 am
- Location: Montreal, QC, Canada
Re: Rotator with dynamic image or Image with dynamic rotatio
You have absolutely no basis for saying that. In fact, there is no reason it should work. This is evidenced by the fact that it didn't work. Rainmeter does not replace %1 with the measure being used by the meter. That is a special case for String meters only.JpsCrazy wrote:I never even thought of getting an image name like that.
Theoretically, it should work.
The simplest way to get it to work is to use the measure's name as a dynamic variable in the rotator:
Code: Select all
[hourmeter]
Meter=Rotator
MeasureName=hourmeasure
ImageName=[hourmeasure].png
DynamicVariables=1
etc...
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Rotator with dynamic image or Image with dynamic rotatio
Ummm.... That actually does work for image meters, and as far as I know, only for Image and String meters.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
-
- Posts: 5
- Joined: January 22nd, 2011, 1:07 am
Re: Rotator with dynamic image or Image with dynamic rotatio
Using %1 in the ImageName field was right there in the tutorial for Image meters. I'm only following that. And it definitely does change images, but only on the image meter, I believe.
Whatever, here's the whole meter:
It's messy and all, but that's what it is. The images change correctly according to time, but do not rotate at all.
Whatever, here's the whole meter:
Code: Select all
[Rainmeter]
Authoer=A-Type
Update=1000
;Metadata added by RainBrowser
;http://rainmeter.net/cms/Rainmeter101-EditingSkins
[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=
;End of added Metadata
[Variables]
rotation1=180
rotation2=0
startAngle=2.9
;==========================
[timemeasure]
Measure=Time
[hourmeasure]
Measure=Time
Format=%I
Substitute="01":"01h","02":"02h","03":"03h","04":"04h","05":"05h","06":"06h","07":"07h","
08":"08h","09":"09h","10":"10h","11":"11h","12":"12h"
[minutemeasure]
Measure=Time
Format=%M
[secondsmeasure]
Measure=Time
Format=%S
;==========================
[hourmeter]
Meter=Image
MeasureName=hourmeasure
ImageName=%1.png
X=0
Y=0
W=360
H=360
Antialias=1
ImageRotate=([hourmeasure] * 30 + 180)
DynamicVariables=1
[minutemeter1]
Meter=Image
MeasureName=minutemeasure
ImageName=%1.png
X=0
Y=0
W=360
H=360
ImageRotate=([minutemeasure] * 12)
DynamicVariables=1
Antialias=1
-
- Rainmeter Sage
- Posts: 141
- Joined: April 18th, 2009, 8:26 pm
- Location: Montreal, Quebec, Canada 45.5658°N, 73.5898°W UTC -5
Re: Rotator with dynamic image or Image with dynamic rotatio
Just a quick review...
1- you substitute the value of the hours by adding the letter h on them, why?
if it's just to make a different name for the images because the minute images are already named that way, you could put the minute & hour images in two different folders called "hours" "minutes" to avoid conflict.
the meters will look like this...
[hourmeter]
Meter=Image
Path=\hours\
MeasureName=hourmeasure
[minutemeter1]
Meter=Image
Path=\minutes\
MeasureName=minutemeasure
you don't have to specify the image name, Rainmeter will search automatically for the png image of the value returned by the measure, in the skin subfolder specify in the Path=
2- ImageRotate=([hourmeasure] * 30 + 180)
ImageRotate afaik only read numerical value, and doesn't calculate values.
If you have to calculate something, you have to use the calculate fonction in a measure, and the formula= recognize only numerical values...
if you try to calculate 1apple + 2oranges + 1bunch of grapes, don't expect to have "fruits basket" for the result!, the calculate formula of the measure just go "you want me to calculate What???!"
You have to substitute 1apple by 1, 2oranges by 2, 1bunch of grapes by 3, (fruits basket=6)
So...
[hourcalculate]
Measure=Calc
Formula=(hourmeasure *30 + 180)
in the meter...
ImageRotate=[hourcalculate]
DynamicVariables=1
GM
1- you substitute the value of the hours by adding the letter h on them, why?
if it's just to make a different name for the images because the minute images are already named that way, you could put the minute & hour images in two different folders called "hours" "minutes" to avoid conflict.
the meters will look like this...
[hourmeter]
Meter=Image
Path=\hours\
MeasureName=hourmeasure
[minutemeter1]
Meter=Image
Path=\minutes\
MeasureName=minutemeasure
you don't have to specify the image name, Rainmeter will search automatically for the png image of the value returned by the measure, in the skin subfolder specify in the Path=
2- ImageRotate=([hourmeasure] * 30 + 180)
ImageRotate afaik only read numerical value, and doesn't calculate values.
If you have to calculate something, you have to use the calculate fonction in a measure, and the formula= recognize only numerical values...
if you try to calculate 1apple + 2oranges + 1bunch of grapes, don't expect to have "fruits basket" for the result!, the calculate formula of the measure just go "you want me to calculate What???!"
You have to substitute 1apple by 1, 2oranges by 2, 1bunch of grapes by 3, (fruits basket=6)
So...
[hourcalculate]
Measure=Calc
Formula=(hourmeasure *30 + 180)
in the meter...
ImageRotate=[hourcalculate]
DynamicVariables=1
GM
If at first you don't succeed; call it version 0.1
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Rotator with dynamic image or Image with dynamic rotatio
There's a slightly different way to deal with the image names. Just add an h to the imagename line.
Please note that the image rotates on the X and Y value. Anything that is in the -x or -y values will not be displayed as they are outside the skin's window.
Code: Select all
[Rainmeter]
Author=A-Type
Update=1000
;Metadata added by RainBrowser
;http://rainmeter.net/cms/Rainmeter101-EditingSkins
[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=
;End of added Metadata
[Variables]
rotation1=180
rotation2=0
startAngle=2.9
;==========================
[timemeasure]
Measure=Time
[hourmeasure]
Measure=Time
Format=%I
[minutemeasure]
Measure=Time
Format=%M
[secondsmeasure]
Measure=Time
Format=%S
;==========================
[msRotate]
Measure=Calc
Formula=hourmeasure * 30 + 180
[hourmeter]
Meter=Image
MeasureName=hourmeasure
ImageName=%1h.png
X=0
Y=0
W=360
H=360
Antialias=1
ImageRotate=[msRotate]
DynamicVariables=1
[msRotate2]
Measure=Calc
Formula=minutemeasure * 12
[minutemeter1]
Meter=Image
MeasureName=minutemeasure
ImageName=%1.png
X=0
Y=0
W=360
H=360
ImageRotate=[msRotate2]
DynamicVariables=1
Antialias=1
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .