September 7, 200223 yr I have developed a system comprising 6 files in FMP5.5v2. The user starts off by a shortcut to the main file, which opens up all the others, initializes variables etc. When shutting down, I include a ShutDown Script with the main file, which closes the other 5 files (by calling 5 times the external ShutDown Script in each of them) before closing itself. In the 5 files, the ShutDown script is a simple Close[mainfile] command. Problem is, the system doesn't work. It behaves erratically, leaving some of the files open when you would expect to only be left with the application window but no file open. Some of the 6 files are related - would that be a problem? Thanks for any help.
September 7, 200223 yr Yes, the relationship are the problem. You can call the 'Exit Application' script step from your main pgm to close the solution
September 7, 200223 yr Author Thanks, Steve. However, exiting the app isn't the most elegant way of doing things, especially when you have to wait for it to open again in a few seconds to open a different system. Surely there has to be a way to shut down a multiple file system with relationships by clicking in one place!??
September 8, 200223 yr When shutting down, I include a ShutDown Script with the main file, which closes the other 5 files (by calling 5 times the external ShutDown Script in each of them) before closing itself. In the 5 files, the ShutDown script is a simple Close[mainfile] command. I'm no expert here, but if I understand things right, it would be erratic. The Close calls the ShutDown... the ShutDown calls the Close... and so on. ShutDown is for commands you want it to run right before it closes the file... it shouldn't close the file. Try having your main file simply close the other five... those closes will call the ShutDowns in those files... which it sounds like for the moment will be empty. Just my 2 pennies worth... one of the forum gurus may set us both straight.
September 8, 200223 yr Author I understand what you mean, a sort a recurring cycle of close-call script-close-etc... I have come across systems, however, which do similar things. In "Using FileMaker Pro 5" by Richard Coulombre of The Support Group, for instance, in the sample systems on the CD accompanying the book, there is an Invoicing system made of 6-7 files, with relationships, and each file has a typical ShutDown script which is a sequence of Close [filename]'s. Each file is scripted, upon closing, to first close all the others. So my question is: how come THAT system doesn't face the same problem? Thanks, Alex.
September 8, 200223 yr The reason the files close then open again is as said, because of relationships. To get around this, simply switch layouts. What I would recommend is a so-called farewell screen, saying goodbye to the user. Thus, there are no related fields or portals on the layout to trigger the files again. This will do it!
September 8, 200223 yr Author Man, Rigsby, thanks a lot!!!!!! It's so simple, I should have thought about it! Thanks, man! BTW, since it's six files, and most of them connected through relationships, would this mean that I should script in each of the files' ShutDown scripts to change to a 'neutral' layout in EACH of the files, and then proceed with closing? If yes, would there be a way to make the screen keep calm while this change-change-change takes place? (perhaps FreezeWindow or something? I don't really know how this command behaves...) Thanks again.
September 8, 200223 yr It is not that difficult, just try that. Personally I am trying several ways to solve one problem. You can for example show closing screen from main file, and then minimize the files which you want to close.
September 9, 200223 yr Yes, I just use the Close[] step to close other files in my systems. Works eveytime.
September 17, 200223 yr Scripting the ShutDown scripts is fine, but most users would try and close a file from the Close File command or the close file symbol ("x" in windows, or the square(?) thingy on a Mac), wouldn't they? I can't find a way to prevent them from doing this.
September 17, 200223 yr Take a look at the SecureFM plug-in at www.newmillennium.com. This plug-in allow you to disable Quit/Close and a host of other menu option. -bd
September 17, 200223 yr You could set the shutdown script of those files to be the files own open script. That is, when the user closes a file manually, it automatically calls the file's open script, essentially keeping it open until another file sends the "real" close command.
September 19, 200223 yr I just post the topic "Quit Filemaker", then found out the similiar topic is already posted here. Anyway I just tried the idea from Peter (The_Bridge), I ran into a infinity loop, what it does is that it open files, then close files, then open files, and on and on. Finally I had to click on the x located at the top right corner of FMP Winodws to shut down FMP. It is not work or I missed something here.
September 19, 200223 yr LiveOak, Do we have to have the Plug in to prevent user from closing the FMP by click x, or File>Exit?
September 20, 200223 yr I think you might have to have a script in an external database to close down your current file. I currently don't utilize any shutdown scripts, but I have a Close button that asks if they want to close just the one file or all. If they choose "All", it runs a "Close All" script I have in Admin.fp5, which obviously closes all files, including the Admin.fp5 file (last). For now, I just encourage users to use the Close button on my layout, not the regular close button.
Create an account or sign in to comment