Hi guys
I want to create a skin, it will load images from folder (this one i can do ), then images will distribute in horizontal line (or vertical) and they scrolling automatically.
Is it possible to do that with Rainmeter?
Anyway, thank you for reading my topic
It is currently October 20th, 2024, 5:37 am
Scrolling images ?
-
- Posts: 8
- Joined: November 6th, 2012, 4:16 pm
-
- Developer
- Posts: 22868
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Scrolling images ?
Maybe something like this:
Requires the 3.3 beta of Rainmeter from http://rainmeter.net.
http://docs.rainmeter.net/manual-beta/plugins/fileview
http://docs.rainmeter.net/manual-beta/measures/loop
Requires the 3.3 beta of Rainmeter from http://rainmeter.net.
Code: Select all
[Rainmeter]
Update=1000
MouseScrollDownAction=[!UpdateMeasure MeasureLoop][!UpdateMeterGroup Images][!Redraw]
[Variables]
MaxFiles=300
ScrollSpeed=5
[MeasurePath]
Measure=Plugin
Plugin=FileView
Path=%USERPROFILE%\Wallpaper
ShowDotDot=0
ShowFolder=0
Extensions="jpg;png"
WildCardSearch=*.*
Count=#MaxFiles#
FinishAction=[!EnableMeasure MeasureLoop][!ShowMeterGroup Images]
[MeasureCount]
Measure=Plugin
Plugin=FileView
Path=[MeasurePath]
Type=FileCount
[MeasureLoop]
Measure=Loop
StartValue=1
EndValue=([MeasureCount] + 1)
Increment=1
LoopCount=1
UpdateDivider=#ScrollSpeed#
DynamicVariables=1
Disabled=1
IfCondition=MeasureLoop > (MeasureCount - 2)
IfTrueAction=[!CommandMeasure MeasureLoop "Reset"]
[MeasureChild1]
Measure=Plugin
Plugin=FileView
Path=[MeasurePath]
Type=FilePath
Index=([MeasureLoop])
DynamicVariables=1
[MeasureChild2]
Measure=Plugin
Plugin=FileView
Path=[MeasurePath]
Type=FilePath
Index=([MeasureLoop] + 1)
DynamicVariables=1
[MeasureChild3]
Measure=Plugin
Plugin=FileView
Path=[MeasurePath]
Type=FilePath
Index=([MeasureLoop] + 2)
DynamicVariables=1
[MeterBackGround]
Meter=Image
W=280
H=100
SolidColor=9,42,71,255
[MeterChild1]
Meter=Image
MeasureName=MeasureChild1
Group=Images
X=10
Y=10
W=80
H=80
PreserveAspectRatio=2
AntiAlias=1
DynamicVariables=1
Hidden=1
LeftMouseUpAction=[!CommandMeasure "MeasureChild1" "Open"]
[MeterChild2]
Meter=Image
MeasureName=MeasureChild2
Group=Images
X=10R
Y=0r
W=80
H=80
PreserveAspectRatio=2
AntiAlias=1
DynamicVariables=1
Hidden=1
LeftMouseUpAction=[!CommandMeasure "MeasureChild2" "Open"]
[MeterChild3]
Meter=Image
MeasureName=MeasureChild3
Group=Images
X=10R
Y=0r
W=80
H=80
PreserveAspectRatio=2
AntiAlias=1
DynamicVariables=1
Hidden=1
LeftMouseUpAction=[!CommandMeasure "MeasureChild3" "Open"]
http://docs.rainmeter.net/manual-beta/measures/loop
-
- Posts: 8
- Joined: November 6th, 2012, 4:16 pm
Re: Scrolling images ?
It works !!! Awesome !!!
Actually, it isn't what i want i want the images scrolling like this skin:
http://eclectic-tech.deviantart.com/art/ScrollTextTM-1-1-405416329
It's scroll the text, but i wonder what if scroll images instead.
Anyway, thank you so much for your help
Actually, it isn't what i want i want the images scrolling like this skin:
http://eclectic-tech.deviantart.com/art/ScrollTextTM-1-1-405416329
It's scroll the text, but i wonder what if scroll images instead.
Anyway, thank you so much for your help
-
- Rainmeter Sage
- Posts: 16676
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Scrolling images ?
Hello tuanlinhtinh,
I just came home after a second short holiday and reading your post I tried to achive, in a different mode, what you asked for. This code works with just two images (#@#First.jpg and #@#Second.jpg), but you can add more image meters (to have more then two images). You can use the QuotePlugin to randomly generate the shown images. Also can change the size of the images (and the two images don't have to have the same size), but this case you have to resize the Background.png (the width of the background must be equal with the maximum of the widths of the two images, the height with the sum of the heights of the two images). Save this image into the @Resources folder (this background is almost transparent).
The code:
I just came home after a second short holiday and reading your post I tried to achive, in a different mode, what you asked for. This code works with just two images (#@#First.jpg and #@#Second.jpg), but you can add more image meters (to have more then two images). You can use the QuotePlugin to randomly generate the shown images. Also can change the size of the images (and the two images don't have to have the same size), but this case you have to resize the Background.png (the width of the background must be equal with the maximum of the widths of the two images, the height with the sum of the heights of the two images). Save this image into the @Resources folder (this background is almost transparent).
The code:
Code: Select all
[Rainmeter]
Update=100
Background=#@#Background.png
[Variables]
Img1C=0
Img2C=0
[Timer]
Measure=Calc
Formula=( Timer + 1 )
IfCondition=(Timer%([MeterImage1:H]+[MeterImage2:H])=0)
IfTrueAction=[!SetVariable Img2C "(#Img2C#+1)"]
IfCondition2=((Timer%[MeterImage1:H]=0)&&((Timer%([MeterImage1:H]+[MeterImage2:H]))>0))
IfTrueAction2=[!SetVariable Img1C "(#Img1C#+1)"]
DynamicVariables=1
Disabled=0
[MeterImage1]
Meter=Image
ImageName=#@#First.jpg
PreserveAspectRatio=1
SolidColor=0,0,0,150
X=0
Y=(-[Timer]+#Img1C#*[MeterImage1:H]+(#Img2C#+(#Img1C#<>#Img2C#))*[MeterImage2:H])
W=120
H=90
DynamicVariables=1
[MeterImage2]
Meter=Image
ImageName=#@#Second.jpg
PreserveAspectRatio=1
SolidColor=80,80,80,150
X=0
Y=(-[Timer]+(#Img1C#+(#Img1C#=#Img2C#))*[MeterImage1:H]+#Img2C#*[MeterImage2:H])
W=120
H=90
DynamicVariables=1
[MeterImage3]
Meter=Image
ImageName=#@#First.jpg
PreserveAspectRatio=1
SolidColor=0,0,0,150
X=0
Y=([MeterImage2:Y]+[MeterImage2:H])
W=[MeterImage1:W]
H=[MeterImage1:H]
Hidden=(#Img1C#<>#Img2C#)
DynamicVariables=1
[MeterImage4]
Meter=Image
ImageName=#@#Second.jpg
PreserveAspectRatio=1
SolidColor=80,80,80,150
X=0
Y=([MeterImage1:Y]+[MeterImage1:H])
W=[MeterImage2:W]
H=[MeterImage2:H]
Hidden=(#Img1C#=#Img2C#)
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
-
- Posts: 8
- Joined: November 6th, 2012, 4:16 pm
Re: Scrolling images ?
It's works !!!
Thank you balala
Now all i need to do is find how to randomly generate images from folder.
It's gonna be awesome !!!
Thank you balala
Now all i need to do is find how to randomly generate images from folder.
It's gonna be awesome !!!
-
- Rainmeter Sage
- Posts: 16676
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Scrolling images ?
It's a bit complicated, because you have to add one more image meter, but it's not impossible at all. Here's a simple solution:tuanlinhtinh wrote:Now all i need to do is find how to randomly generate images from folder.
Code: Select all
[Rainmeter]
Update=100
Background=#@#Background.png
[Variables]
Path=
Img1C=0
Img2C=0
Img3C=0
Img=0
[ImageStyle]
X=0
W=120
H=90
DynamicVariables=1
[Timer]
Measure=Calc
Formula=( Timer + 1 )
IfCondition=(Timer%90=0)
IfTrueAction=[!SetVariable Img "(#Img#+1)"]
DynamicVariables=1
Disabled=0
[Timer2]
Measure=Calc
Formula=#Img#
IfCondition=(Timer2%3=1)
IfTrueAction=[!SetVariable Img1C "(#Img1C#+1)"][!UpdateMeasure "Random1"]
IfCondition2=(Timer2%3=2)
IfTrueAction2=[!SetVariable Img2C "(#Img2C#+1)"][!UpdateMeasure "Random2"]
IfCondition3=((Timer2%3=0)&&(Timer2>0))
IfTrueAction3=[!SetVariable Img3C "(#Img3C#+1)"][!UpdateMeasure "Random3"]
DynamicVariables=1
[Random1]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName=#Path#
Subfolders=1
FileFilter=*.jpg;*.jpeg;*.jpe;*.bmp;*.gif;*.png
UpdateDivider=-1
[Random2]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName=#Path#
Subfolders=1
FileFilter=*.jpg;*.jpeg;*.jpe;*.bmp;*.gif;*.png
UpdateDivider=-1
[Random3]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName=#Path#
Subfolders=1
FileFilter=*.jpg;*.jpeg;*.jpe;*.bmp;*.gif;*.png
UpdateDivider=-1
[MeterImage1]
Meter=Image
MeasureName=Random1
PreserveAspectRatio=1
SolidColor=80,80,80,150
MeterStyle=ImageStyle
Y=(-[Timer]+#Img1C#*([MeterImage1:H]+[MeterImage2:H]+[MeterImage3:H]))
LeftMouseUpAction=["[Random1]"]
[MeterImage2]
Meter=Image
MeasureName=Random2
PreserveAspectRatio=1
SolidColor=120,120,120,150
MeterStyle=ImageStyle
Y=([MeterImage1:Y]+((#Img1C#=#Img2C#)*[MeterImage1:H])-((#Img1C#>#Img2C#)*([MeterImage2:H]+[MeterImage3:H])))
LeftMouseUpAction=["[Random2]"]
[MeterImage3]
Meter=Image
MeasureName=Random3
PreserveAspectRatio=1
SolidColor=160,160,160,150
MeterStyle=ImageStyle
Y=([MeterImage2:Y]+((#Img2C#=#Img3C#)*[MeterImage2:H])-((#Img2C#>#Img3C#)*([MeterImage1:H]+[MeterImage2:H])))
LeftMouseUpAction=["[Random3]"]
-
- Posts: 8
- Joined: November 6th, 2012, 4:16 pm
Re: Scrolling images ?
It's perfect !!! Thank you so much balala
-
- Rainmeter Sage
- Posts: 16676
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania