It is currently May 17th, 2024, 2:53 am

Pause Quote plugin slideshow?

Get help with creating, editing & fixing problems with skins
Asagrim
Posts: 126
Joined: August 12th, 2011, 12:30 pm

Pause Quote plugin slideshow?

Post by Asagrim »

I searched the forums for "quote slideshow pause", came up with four results, three relevant, all in a single topic written a year ago in the introduction section, with a dead link to my solution.

Here is my (very incomplete, about 30% done) code:

Code: Select all

[Rainmeter]
Update=1000

[Variables]
userprofile=%USERPROFILE%
speed=15

[MeasurePictures]
Measure=Plugin
Plugin=QuotePlugin
PathName=#userprofile#\Pictures
Subfolders=1
FileFilter=*.jpg;*.gif;*.bmp;*.png;*.jpeg
UpdateDivider=#speed#
DynamicVariables=1

[MeterSlideshowBackground]
Meter=Image
X=0
Y=0
SolidColor=0,0,0,150
W=475
H=250
UpdateDivider=-1

[Resume]
Meter=BUTTON
ButtonImage=Play.png
X=20r
Y=0
Hidden=1
ButtonCommand=!Execute [!SetVariable "speed" "15"][!Showmeter Pause][!Hidemeter Resume]

[Pause]
Meter=BUTTON
ButtonImage=Pause.png
X=r
Y=r
Hidden=0
ButtonCommand=!Execute [!SetVariable "speed" "-1"][!Showmeter Resume][!Hidemeter Pause]

[SetAsWallpaper]
Meter=BUTTON
ButtonImage=Desktop.png
X=r
Y=20r
ButtonCommand=!SetWallpaper [MeasurePictures] Fit

[MeterShowPicture]
Meter=Image
MeasureName=MeasurePictures
X=25
Y=0
W=450
H=250
PreserveAspectRatio=1
;LeftMouseUpAction=!Execute [[MeasurePictures]]
Here is the problem:
The play/pause buttons are defunct. When i want to pause a picture, the Quote measure only updates (pauses) at the next picture, not at the one i pressed pause at, and when it pauses, i can't resume it anymore, since Quote doesn't re-enable itself after changing the update interval to a positive value again.

So the question at hand is: how could i interrupt/resume the slideshow at instant, instead of waiting for the next cycle?
Last edited by Asagrim on November 10th, 2012, 1:32 am, edited 1 time in total.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Pause Quote plugin slideshow?

Post by smurfier »

Try this:

Code: Select all

[Rainmeter]
Update=1000

[Variables]
userprofile=%USERPROFILE%
speed=15
pause=1

[cCounter]
Measure=Calc
Formula=cCounter%#speed#+#pause#
IfEqualValue=#speed#
IfEqualAction=!UpdateMeasure MeasurePictures
DynamicVariables=1

[MeasurePictures]
Measure=Plugin
Plugin=QuotePlugin
PathName=#userprofile#\Pictures
Subfolders=1
FileFilter=*.jpg;*.gif;*.bmp;*.png;*.jpeg
UpdateDivider=-1

[MeterSlideshowBackground]
Meter=Image
X=0
Y=0
SolidColor=0,0,0,150
W=475
H=250
UpdateDivider=-1

[Resume]
Meter=BUTTON
ButtonImage=Play.png
X=20r
Y=0
Hidden=1
ButtonCommand=[!SetVariable pause 1][!Showmeter Pause][!Hidemeter Resume]

[Pause]
Meter=BUTTON
ButtonImage=Pause.png
X=r
Y=r
Hidden=0
ButtonCommand=!Execute [!SetVariable pause 0[!Showmeter Play][!Hidemeter Pause]

[SetAsWallpaper]
Meter=BUTTON
ButtonImage=Desktop.png
X=r
Y=20r
ButtonCommand=!SetWallpaper [MeasureMyPictures] Fit

[MeterShowPicture]
Meter=Image
MeasureName=MeasureMyPictures
X=25
Y=0
W=450
H=250
PreserveAspectRatio=1
;LeftMouseUpAction=["[MeasureMyPictures]"]
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 . . .
Asagrim
Posts: 126
Joined: August 12th, 2011, 12:30 pm

Re: Pause Quote plugin slideshow?

Post by Asagrim »

Works like a charm! Thank you! If i'm ever going to release a skin including this slideshow, i will give you credit of course! :)

I also added [!Refresh] to resume, so it wouldn't show the paused picture for another cycle.