Please note that you can subscribe to the individual forums. A subscription for news only covers the news.
Has anyone found a way of launching a slide show in the program?
I'm trying to find a way of having a slide show launched that would randomly display a set folder of pictures for a set amount of time and then be removed. Any suggestions?
The show seems not to stop.
Procedure SetTimer sets flag time25sec which expires to set flag TimerDone, which should stop the show.
Procedure Chosess selects picture to show, (blocked if TimerDone).
Procedure SetFlagss sets flag slideshow, which expires to call up RemoveSlide.
Procedure RemoveSlide calls up StartSlideShow (this procedure), which I believe is resetting flag time25sec and meaning the show goes on forever. You could move Procedure=SetTimer out of this procedure and into SlideShow.
I’m not sure how it’s bypassing the built-in feature that prevents loops.
I’m also uncertain of how Mintime works with flags. I’d set up flag timer25sec with ‘Duration’ and ‘ExpireProcedure’ rather than mintime and mintimeprocedure. Still looking into the applications for Mintime...
As to the question of controlling where pictures appear on the screen, I’d like an answer to that myself.
Just a few comments.
You cannot reuse the picture window to the next picture. But you can close it before you show the next picture.
The difference between duration and mintime in flags is:
When the duration has passed, the flag is removed and the ExpireProcedure is called, if any. If the flag is removed before the duration is up, nothing happens.
When mintime has been passed, the MinTimeProcedure is called, if any, but the flag remains. If the flag is removed before mintime is up, the sub is punished, if a QuickPenalty is defined.
I get it. Thanks. I hadn't imagined that the two procedures could be used with flags.
The slideshow script idea has helped me out. Thanks Chazz. In the interests of avoiding the anti-loop feature I had some long scripts of procedure followed by flag for pause which expires to call the next procedure etc: 24 clouts with the frying pan would involve 24 procedures. But it seems there's no loop avoidance when a flag separates the first and second procedures. If you follow.
Thank you both for your help. Sven, when I change from mintime and mintimeprocedure to duration and expireprocedure it still does not turn off the settimer flag at the desired interval allowing the program to continue. Any thoughts?
@simon-cagey: Yes, loop avoidance only happens when a procedure is called more than once from the same action. The expiration of a flag is a separate action.
@chazz: I am quite busy at the moment, and I don't have the energy to debug other peoples scripts. Sorry.
I completely understand Sven. Thanks. I just wanted to make certain it wasn't a bug.
It still seems the timer is reset on each circuit. Procedure Removeslide calls StartSlideShow which resets the timer. Move Procedure=SetTimer out of Startslideshow. This is an abbreviated version - it works but may cut out some useful steps in your wider script.
Of course, 'removeflag=slideshow' is pointless: it's expired!
Great!! Thanks so much Simon!