July 15, 20169 yr 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?
July 16, 20169 yr 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.
July 16, 20169 yr Check out Simpre: https://github.com/osamunoda/simpre tutorial video : https://www.youtube.com/watch?v=y_DB3RVshCg
July 17, 20169 yr 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!
July 19, 20169 yr Author 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.
July 20, 20169 yr Author 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, 20169 yr by Hijack
July 20, 20169 yr 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).
Create an account or sign in to comment