Hijack Posted July 15, 2016 Posted July 15, 2016 I'm trying to figure out the best way to create an images slideshow in FM15. I have a layout with a portal of images I'd like to loop through and copy each image to a global container which displays in another open window. I'd like to give the user a "stop" button to abort the slideshow. I can put a stop button on layout that unhides when the slideshow begins and tie that to a script that simply halts all running scripts. But, that doesn't prevent the user from tinkering with other aspects of the DB while the slideshow script is running which would really hork things up if the user shifts focus, closes the window, etc. I thought of throwing up a dialog window with a stop button on it but dialog windows grab focus from all other windows even during a script so I can't hop back to the images layout after the dialog window is displayed to begin the loop. Anyone dealt with a similar scenario before?
dwdata Posted July 16, 2016 Posted July 16, 2016 Hi Robert, You could always just set a VAR and wrap your advance slide script steps with some logic that looks to that VAR: -- Start Slide Show -- (button behavior set to Halt Script) Set Field['image', 'first image'] Set Variable [$$pause, 1] Loop Pause/Resume Script ['5'] Exit Loop If ['last image'] If[$$pause = 1] Set Field['image', 'next image'] End If End Loop -- Pause SlideShow -- (button behavior set to Resume Script) Set Variable [$$pause, ""] -- Resume SlideShow -- (button behavior set to Resume Script) Set Variable [$$pause, 1] -- Stop SlideShow -- (button behavior set to Halt Script) Set Variable [$$pause, ""] Set Field['image', 'starting splash page'] This is quick and dirty, but you get the idea.
bruceR Posted July 16, 2016 Posted July 16, 2016 Check out Simpre: https://github.com/osamunoda/simpre tutorial video : https://www.youtube.com/watch?v=y_DB3RVshCg
Lee Smith Posted July 16, 2016 Posted July 16, 2016 Hey Bruce, Wow, what an amazing video and file. Lee
bruceR Posted July 17, 2016 Posted July 17, 2016 Yes, it is! I had the pleasure of helping him debug it a bit, it didn't work on one of my computers, I gave him some feedback, he was able to get it squared away. Yes, very nicely file!
Hijack Posted July 19, 2016 Author Posted July 19, 2016 DWData: Your script is pretty much what I have currently to launch the slideshow (without the var adjustments. I can control the script and stop it with a button to halt scripts but the issue is that I don't want any of the other buttons on the layout to be used while the slideshow script is running. Bruce: interesting slideshow DB. Not quite what I need since I need to integrate the slideshow with my own system though.
Hijack Posted July 20, 2016 Author Posted July 20, 2016 (edited) Bruce: Not sure what you mean. You mean conflict between exclusively using my own system vs.utilizing another solution? If that's the case, the Simpre system is overkill for the simple need I have. Edited July 20, 2016 by Hijack
dwdata Posted July 20, 2016 Posted July 20, 2016 On July 19, 2016 at 9:18 AM, Hijack said: DWData: Your script is pretty much what I have currently to launch the slideshow (without the var adjustments. I can control the script and stop it with a button to halt scripts but the issue is that I don't want any of the other buttons on the layout to be used while the slideshow script is running. What buttons are you concerned about? Could you mock up a quick example file with the button issue you are concerned about. I will take look a make a few mods to deal with it (or at a minimum make a few suggestions).
Recommended Posts
This topic is 3046 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now