It is currently September 19th, 2024, 8:19 pm

New here. Have a little problem :).

Introduce yourself to the Rainmeter community!
Joe1121
Posts: 3
Joined: July 10th, 2011, 9:39 am

New here. Have a little problem :).

Post by Joe1121 »

Hey peeps. New here :). Been using rainmeter for awile now. And have been trying to figure out how to make a nice slideshow of images. I got most down, but i'm stuck at making a stop button that changes in to a play button when you press it. To stop and play the slideshow. I got a next and previous button. If someone could help i'd be most appreciative :).
FlyingHyrax
Posts: 232
Joined: July 1st, 2011, 1:32 am
Location: US

Re: New here. Have a little problem :).

Post by FlyingHyrax »

Hey there Joe1121,
Welcome to the forums! :welcome:

I would use a combination of ShowMeter/HideMeter bangs to make the play/stop switch.
What I mean is, on your meter for the play button, add a bang to your "play" mouse action that hides the play button and shows the stop button, a second meter in the same location. On the stop button meter, so the same thing but switch which skin is shown/hidden. So that they don't show up at the same time when you first open the skin, set one to Hidden=1.

Rather like this: (incomplete code)

Code: Select all

[MeterStop]
Meter=IMAGE
ImageName=Stop.png
X=5
Y=5
LeftMouseUpAction=!Execute [!RainmeterHideMeter MeterStop] [!RainmeterShowMeter MeterPlay] [!RainmeterRedraw]

[MeterPlay]
Meter=IMAGE
ImageName=Play.png
X=5
Y=5
Hidden=1
LeftMouseUpAction=!Execute [!RainmeterHideMeter MeterPlay] [!RainmeterShowMeter MeterStop] [!RainmeterRedraw]
Note the !RainmeterRedraw bang - it forces a redraw of the skin window, which updates all the meters (not measures). So the appearance change happens immediately instead of on the next Update cycle. Makes things "snappy."

I've never done a slideshow skin, so if you need help getting the actual "stopping/going" to work, I'm not the best person to ask. But the above method for show/hide is useful for all sorts of things - battery bars, skins with tabbed interfaces, and dynamic buttons.

I hope that helps and that I understood what you were asking for,
If you have other questions just ask. :)
Flying Hyrax on DeviantArt
Joe1121
Posts: 3
Joined: July 10th, 2011, 9:39 am

Re: New here. Have a little problem :).

Post by Joe1121 »

FlyingHyrax wrote:Hey there Joe1121,
Welcome to the forums! :welcome:

I would use a combination of ShowMeter/HideMeter bangs to make the play/stop switch.
What I mean is, on your meter for the play button, add a bang to your "play" mouse action that hides the play button and shows the stop button, a second meter in the same location. On the stop button meter, so the same thing but switch which skin is shown/hidden. So that they don't show up at the same time when you first open the skin, set one to Hidden=1.

Rather like this: (incomplete code)

Code: Select all

[MeterStop]
Meter=IMAGE
ImageName=Stop.png
X=5
Y=5
LeftMouseUpAction=!Execute [!RainmeterHideMeter MeterStop] [!RainmeterShowMeter MeterPlay] [!RainmeterRedraw]

[MeterPlay]
Meter=IMAGE
ImageName=Play.png
X=5
Y=5
Hidden=1
LeftMouseUpAction=!Execute [!RainmeterHideMeter MeterPlay] [!RainmeterShowMeter MeterStop] [!RainmeterRedraw]
Note the !RainmeterRedraw bang - it forces a redraw of the skin window, which updates all the meters (not measures). So the appearance change happens immediately instead of on the next Update cycle. Makes things "snappy."

I've never done a slideshow skin, so if you need help getting the actual "stopping/going" to work, I'm not the best person to ask. But the above method for show/hide is useful for all sorts of things - battery bars, skins with tabbed interfaces, and dynamic buttons.

I hope that helps and that I understood what you were asking for,
If you have other questions just ask. :)
Hey thanks. That worked nicely :). Now to get the play and stop button to work :).
FlyingHyrax
Posts: 232
Joined: July 1st, 2011, 1:32 am
Location: US

Re: New here. Have a little problem :).

Post by FlyingHyrax »

I did a search on the forums and found this thread, where it looks like someone made a slideshow with a pause function.

If you download the skin attached to the bottom post on the first page, and look at the file Normal+.ini, you can see how they did it. It looks like they just disable/enabled their Quote Plugin measure to get a pause/play effect.

They also have a very elegant solution for the icon change. In this case, better than the method I gave you for sure.

I just looked through their code - so I don't know if it actually works. But it's definitely something to try out.
Flying Hyrax on DeviantArt
Joe1121
Posts: 3
Joined: July 10th, 2011, 9:39 am

Re: New here. Have a little problem :).

Post by Joe1121 »

FlyingHyrax wrote:I did a search on the forums and found this thread, where it looks like someone made a slideshow with a pause function.

If you download the skin attached to the bottom post on the first page, and look at the file Normal+.ini, you can see how they did it. It looks like they just disable/enabled their Quote Plugin measure to get a pause/play effect.

They also have a very elegant solution for the icon change. In this case, better than the method I gave you for sure.

I just looked through their code - so I don't know if it actually works. But it's definitely something to try out.
Thanks :). That one works. But i found a picture frame i want to use instead of my own. http://darkeagle2011.deviantart.com/gallery/29687983#/d38u1ku Sub-Divided Photo Slider which is awesome :).. Say if i wanted to add the pause/play to that how would i do it? I tried but i can't seem to get it to work... I can get the button to show up on mouseover and get the icon to change when pressed, but the slideshow won't pause.
FlyingHyrax
Posts: 232
Joined: July 1st, 2011, 1:32 am
Location: US

Re: New here. Have a little problem :).

Post by FlyingHyrax »

In that skin, the author is putting the output of the Quote Plugin measure through a calc measure (to do the timing between picture changes). If you disable the calc measure, it should pause - I think the measure in question is called "fsa."

So you'll need to use either use !RainmeterDisableMeasure/!RainmeterEnableMeasure, or just !RainmeterToggleMeasure, on your button/image meters.

I hope that points you in the right direction; if you get stuck post your code (just use tags) so I can get a picture of where you're at with it.

(By the way, this is the list of !bangs I'm referencing.)
Flying Hyrax on DeviantArt