Hi All,
I want to load an image based on specific time say every 30 mins. I am not IT guy and wanted to make meter which shows daylight map I have created. I do not want to download maps from internet it does not fit in my theme.
If anyone who can help me to make meter which load image from local directory on specific GMT time, I will appreciate their help.
cheers,
vapn
It is currently November 29th, 2023, 5:23 am
LOAD IMAGE ON SPECIFIC TIME
-
- Posts: 7
- Joined: February 20th, 2010, 6:25 am
-
- Posts: 127
- Joined: June 10th, 2009, 8:26 am
Re: LOAD IMAGE ON SPECIFIC TIME
one method is a counter-
[CALC1]
Measure=CALC
Formula=Counter % 96 (or as many images as you have)
Disabled=0
[BACK]
MeasureName=CALC1
Meter=IMAGE
ImageName=%1.png
X=0
Y=0
H=128
W=160
Another method is an image based on time -
[MeasureTime]
Measure=Time
Format="%H"
[BACK]
MeasureName=MeasureTime
Meter=IMAGE
ImageName=%1.png
X=0
Y=0
H=128
W=160
you have to name your images 1,2,3 ect
for example below at 1130 o clock it will show image 113000, if you have an image called 113000
[MeasureTime]
Measure=Time
Format="%H%M%S"
[BACK]
MeasureName=MeasureTime
Meter=IMAGE
ImageName=%1.png
X=0
Y=0
H=128
W=160
[CALC1]
Measure=CALC
Formula=Counter % 96 (or as many images as you have)
Disabled=0
[BACK]
MeasureName=CALC1
Meter=IMAGE
ImageName=%1.png
X=0
Y=0
H=128
W=160
Another method is an image based on time -
[MeasureTime]
Measure=Time
Format="%H"
[BACK]
MeasureName=MeasureTime
Meter=IMAGE
ImageName=%1.png
X=0
Y=0
H=128
W=160
you have to name your images 1,2,3 ect
for example below at 1130 o clock it will show image 113000, if you have an image called 113000
[MeasureTime]
Measure=Time
Format="%H%M%S"
[BACK]
MeasureName=MeasureTime
Meter=IMAGE
ImageName=%1.png
X=0
Y=0
H=128
W=160
-
- Moderator
- Posts: 995
- Joined: June 10th, 2009, 12:44 pm
- Location: Sweden
Re: LOAD IMAGE ON SPECIFIC TIME
Code: Select all
[Time]
Measure=Time
Format=%M
[Display00]
MeasureName=Time
Meter=String
IfEqualValue=00
IfEqualAction=!Execute [!RainmeterShowMeter Pic00]
IfAboveValue=00
IfAboveAction=!Execute [!RainmeterHideMeter Pic00]
[Display30]
MeasureName=Time
Meter=String
IfEqualValue=30
IfEqualAction=!Execute [!RainmeterShowMeter Pic30]
IfAboveValue=30
IfAboveAction=!Execute [!RainmeterHideMeter Pic30]
[Pic00]
Meter=Image
Path=....
ImageName=Pic00
X=
Y=
H=
W=
PreserveAspectRatio=
Hidden=1
[Pic30]
Meter=Image
Path=....
ImageName=Pic30
X=
Y=
H=
W=
PreserveAspectRatio=
Hidden=1
I don't think, therefore I'm not.
-
- Posts: 7
- Joined: February 20th, 2010, 6:25 am
Re: LOAD IMAGE ON SPECIFIC TIME
Thanks wasky1,
I was able to load images at every hour with below code ( based on ur suggestion). my image names were 01, 02......24.
[MeasureTime]
Measure=Time
Format="%H"
[BACK]
MeasureName=MeasureTime
Meter=IMAGE
ImageName=%.png
X=0
Y=0
H=128
W=160
Can you suggest some tweaking for every half hour? Your help is highly appreciated.
Thanks again,
vapn
I was able to load images at every hour with below code ( based on ur suggestion). my image names were 01, 02......24.
[MeasureTime]
Measure=Time
Format="%H"
[BACK]
MeasureName=MeasureTime
Meter=IMAGE
ImageName=%.png
X=0
Y=0
H=128
W=160
Can you suggest some tweaking for every half hour? Your help is highly appreciated.
Thanks again,
vapn
-
- Posts: 7
- Joined: February 20th, 2010, 6:25 am
Re: LOAD IMAGE ON SPECIFIC TIME
Thanks Chewtoy,
It seems it will change two images (image00 & image30) at every hour. what do i need it to change 48 images each on specific time? Does that mean that I have to repeat this code several time to suite time. I still have not tried this code. I will do this tonight.
Thanks for your suggestion,
vapn
It seems it will change two images (image00 & image30) at every hour. what do i need it to change 48 images each on specific time? Does that mean that I have to repeat this code several time to suite time. I still have not tried this code. I will do this tonight.
Thanks for your suggestion,
vapn
-
- Moderator
- Posts: 995
- Joined: June 10th, 2009, 12:44 pm
- Location: Sweden
Re: LOAD IMAGE ON SPECIFIC TIME
If you want 48 images I would suggest you do like we do with weather icons.vapn.sub wrote:Thanks Chewtoy,
It seems it will change two images (image00 & image30) at every hour. what do i need it to change 48 images each on specific time? Does that mean that I have to repeat this code several time to suite time. I still have not tried this code. I will do this tonight.
Thanks for your suggestion,
vapn
[Time]
Measure=Time
Format="%H%M"
[Image]
MeasureName=Time
Meter=Image
Path=Path\To\Images\
X=
Y=
W=
H=
PreserveAspectRatio=
And then just name the images 0930, 1000, 1330 and what not. It will check for images every second, but there won't be any images for it to find.
Though you can make the update time a lot longer and then have another time measure make sure you update every half hour. Takes some more code but.. Anyways.
I don't think, therefore I'm not.
-
- Posts: 7
- Joined: February 20th, 2010, 6:25 am
Re: LOAD IMAGE ON SPECIFIC TIME
Chewtoy,Chewtoy wrote: If you want 48 images I would suggest you do like we do with weather icons.
[Time]
Measure=Time
Format="%H%M"
[Image]
MeasureName=Time
Meter=Image
Path=Path\To\Images\
X=
Y=
W=
H=
PreserveAspectRatio=
And then just name the images 0930, 1000, 1330 and what not. It will check for images every second, but there won't be any images for it to find.
Though you can make the update time a lot longer and then have another time measure make sure you update every half hour. Takes some more code but.. Anyways.
It works perfectly and seems more logical too. Only issue is it does not show any image if turn on ur computer at some other time say 0906, 1237 etc. Do u have any solution for that? Sorry if I am bugging too much, I dnt have any scripting experience.
Thanks for ur help
-
- Moderator
- Posts: 995
- Joined: June 10th, 2009, 12:44 pm
- Location: Sweden
Re: LOAD IMAGE ON SPECIFIC TIME
Could try to substitute the numbers...
Substitute="01":"00","02":"00","03":"00"..."39":"30"
Get it?
And if it doesn't work straight away, try adding a DynamicVariables=1 to the image-meter.
Substitute="01":"00","02":"00","03":"00"..."39":"30"
Get it?
And if it doesn't work straight away, try adding a DynamicVariables=1 to the image-meter.
I don't think, therefore I'm not.
-
- Posts: 127
- Joined: June 10th, 2009, 8:26 am
Re: LOAD IMAGE ON SPECIFIC TIME
you could use on your measures -
ifequalvalue=0906
ifequalaction=!Execute [!RainmeterShowMeter sunny]
of course you would need so many calc measures on one time measure
ifequalvalue=0906
ifequalaction=!Execute [!RainmeterShowMeter sunny]
of course you would need so many calc measures on one time measure
-
- Rainmeter Sage
- Posts: 642
- Joined: July 19th, 2009, 5:59 am
- Location: Montreal, QC, Canada
Re: LOAD IMAGE ON SPECIFIC TIME
I'm going to assume you have 48 images because you want one to load at each half hour. Try this:
Code: Select all
[MeasureHour]
Measure=Time
Format=%H
[MeasureMinute]
Measure=Time
Format=%M
[MeasureImage]
Measure=Calc
Formula=MeasureHour*100+(MeasureMinute<30 ? 0 : 30)+9990000
Substitute="999":""
[Image]
Meter=Image
MeasureName=MeasureImage
ImagePath=blah/blah/blah
...etc.