1 2 Previous Next 18 Replies Latest reply on May 19, 2014 10:28 AM by lijnbach

    Help..? Made a mistake. FMP closes at start up

    lijnbach

      Title

      Help..? Made a mistake. FMP closes at start up

      Post

           Hello everybody,

           I made as mistake in a script. Nothing serious.

           It is a script with a "close window". Now, if I start up Filemaker, Filemaker directly closes the start up window. So, I don't have acces to this database. Is there a way to start up in LayOut Mode, or another solution?

           (Because I am traveling at this moment, my last back up is from yesterday, and going back to the backup would cost me a lot of work).

           Thanks in advance,

           Hans Lijnbach.

        • 1. Re: Help..? Made a mistake. FMP closes at start up
          SteveMartino

               Only if you have Advanced.  Open up FM, no File.  Open up Script Debugger.  Then open file and cancel script.  Or send the file to someone who has advanced.

               Symbister once replied to one of my posts with this helpful suggestion:

          I've found - the hard way - that adding a couple lines of code to your 'opener' script saves a lot of hair-pulling:

          If [Get (ActiveModifierKeys ) = 1 or Get (ActiveModifierKeys ) = 3]
               Halt Script
               End If

          will interrupt an opening script by holding down the Shift Key (OR Shift Key and Caps Lock)

          • 2. Re: Help..? Made a mistake. FMP closes at start up
            lijnbach

                 Thanks a lot Steve,

                 I have Advanced. And it worked. And you are right, I should work on my startup script to prevent these kind of problems. 

                 Thanks for your time and effort,

                 Hans Lijnbach.

            • 3. Re: Help..? Made a mistake. FMP closes at start up
              philmodjunk

                   It is also possible to open a file without performing the start up script in some cases even if you do not have FMP Adv. You can create a new file and use a script with the perform script step to perform a script in the first file. This can then open the file and you can then modify file options to return the file to a state where you can open the file without it immediately quitting on you.

              • 4. Re: Help..? Made a mistake. FMP closes at start up
                lijnbach

                     This also works Phil, I tried it.

                     But something else regarding this issue. 

                     Because of security reasons, I disable the "Window bar" and have Custom menus. Except when users want to print, then I show a new "Modal Window" in Print Preview with the Window bar, so user can scroll threw the pages. I use the "Modal Window", so users can get no access to the "LayOut Modus".  To prevent users to go to another lay out in this new Modal window, I wrote a script, that when a users changes the lay out, the window is automatically closed. (With "close window" step).

                     It all works fine, accept when I close the "Modal Window" with a script step "close window", and then close the application The Modal window seems to stay active in the background. (Although the window is closed in the application). So, when I start up the application, it performs my startup script, but directly after the startup script the old Modal Window gets back and goes to the Modal window, and closing. (That was why I couldn't start the application anymore).

                     This is not the case when I close the "Modal Window" with the system "close" button. It is only the case when I do not use the close button from the system, but only when I use the "close window" in a script step.

                     Are you familiar with this problem?

                     (I will not be able to give a reaction today because I am traveling)

                     Hans Lijnbach

                • 5. Re: Help..? Made a mistake. FMP closes at start up
                  lijnbach

                       P.S.

                       The steps "Halt Script", "Stop script" and  "End script" does not help, somehow the Modal Windows keeps coming back on startup application.

                       Hans

                  • 6. Re: Help..? Made a mistake. FMP closes at start up
                    philmodjunk

                         It may be helpful to see the actual scripts involved in this.

                    • 7. Re: Help..? Made a mistake. FMP closes at start up
                      lijnbach

                      O.K. Phil, thanks for your response. (Just arrived in my hotel).

                            

                      This is the script I start with. It opens a new window in “Modal mode” (Perhaps you call it “Dialog mode”), sets the conditions, and then opens the appropriate lay out. As I explained, I use the “Modal Window” (Dialog Mode) because users are then not capable of accessing the “Layout mode”. (Changing lay outs).

                            

                      Nieuw venster [ Naam: "Print Venster"; Links: 250; Stijl: Dialoogvenster; Sluiten: “Ja”; Minimaliseren: “Nee”; Maximaliseren:“Nee”; Zoomregelaar: “Nee”; Vergroten/verkleinen: “Nee” ]

                      Werkbalken tonen/verbergen [ Vergrendelen; Weergeven ]

                      Ga naar lay-out [ SY Global fields sorteringen en selecties::Naam print layout ] 

                      Venster aanpassen [ Passend vergroten of verkleinen ]

                            

                      Once I am in the layout, I use the script trigger: On Layout Access. I do this, because I use the same script also for other lay outs. This script step makes a selection of the record set, and than sorts the records to make “grouping” possible. 

                            

                      So far everything works just fine, no problem. By the way, the layout is in “Print preview” mode. This is the script once I am in the lay out:

                            

                      Alle records tonen

                      Ga naar Zoeken[ Herstellen ] 

                      Veld instellen [ GE Leermiddelen -> Leergroepen::Leergroep kode; SY Global fields sorteringen en selecties::Selectie leegroep vanaf &".."& SY Global fields sorteringen en selecties::Selectie leegroep tot en met ]

                      Veld instellen [ GE Leermiddelen::Vakgebied Kode; SY Global fields sorteringen en selecties::Selectie vakgebied vanaf &".."& SY Global fields sorteringen en selecties::Selectie vakgebied tot en met ]

                      Veld instellen [ GE Leermiddelen::Locatie Kode; SY Global fields sorteringen en selecties::Selectie locatie vanaf &".."& SY Global fields sorteringen en selecties::Selectie locatie tot en met ]

                      Veld instellen [ GE Leermiddelen::Lesmateriaal Kode; SY Global fields sorteringen en selecties::Selectie lesmateriaal vanaf &”.."& SY Global fields sorteringen en selecties::Selectie lesmateriaal tot en met ]

                      Foutafvanging instellen [ Aan ]

                      Zoekopdracht uitvoeren [ ]

                      If [ SY Global fields sorteringen en selecties::Soort materiaal = "Computer en Internet" ]

                      Gevonden reeks beperken [ Opgegeven zoekopdrachten: Records weglaten; Criteria: GE Lesmateriaal::Soort materiaal:“Concreet” ][ Herstellen ]

                      Else If [ SY Global fields sorteringen en selecties::Soort materiaal = "Concreet materiaal" ]

                      Gevonden reeks beperken [ Opgegeven zoekopdrachten: Records zoeken; Criteria: GE Lesmateriaal::Soort materiaal:“Concreet” ][ Herstellen ]

                      End If

                      Ga naar Schermafdruk []

                      Records sorteren [ Records in gesorteerde volgorde behouden; Opgegeven sorteervolgorde: GE Locaties::Locatie Kode; oplopend GE Leermiddelen::Vakgebied Kode; oplopend ][ Herstellen; Geen dialoogvenster ]

                            

                      Everything fine so far. I am in the new window, with the right lay out. I have a second script trigger, On Exit Layout. What I am doing in this situation, I close the window if the users chooses another lay out, to prevent they get access to other lay outs.

                      The script “On exit lay” out is easy;

                            

                      Close window

                      Exit script.

                            

                      That all works. (I realize that the system “close” button also performs a “Lay out exit”).

                      Closing this window on “Exit lay out” seems to work. The window closes, and I can do everything, without a problem and the window is closed.

                            

                      They only thing is, if I shut down FMP, and then start up FMP with the same application, I can see the start up script is doing everything, but immediately after the startup script, I get the old window back in preview mode. (And if I don't watch out, also the close window).

                            

                      This is the startup script:

                            

                      If [ Get (ActieveCombinatietoetsen ) = 1 or Get (ActieveCombinatietoetsen ) = 3 ]

                      Script onderbreken
                           Ga naar lay-out [ “Systeembeheer” (AL Orthotheek) ]

                      End If
                           Venster vernieuwen [ Samenvoegresultaten in cache wissen; Externe gegevens in cache wissen ]

                      Ga naar lay-out [ “Hoofdmenu” (AL Orthotheek) ]

                      Venster aanpassen

                      [ Maximaliseren ] Ga naar Bladeren

                      Script afsluiten [ ]

                            

                           But if I skip the script "Close Window" and don't use the script trigger "On Exit lay out", and uses the "close" button from the system, I have no problem. So it seems the lay out stays active in the background. (But then users can get access to other lay outs).

                            

                      I hope you can make something out of this Dutch. Let me know, otherwise I translate them. (But, as far as I know, if you get this scripts in your system, you get the English version).

                            

                      Hans Lijnbach.

                      • 8. Re: Help..? Made a mistake. FMP closes at start up
                        philmodjunk
                             

                        I use the “Modal Window” (Dialog Mode) because users are then not capable of accessing the “Layout mode”.

                        But there are much simpler ways to keep users from entering layout mode. Simply set up accounts that do not allow that level of access for your file.

                             But since I can't read your language (Dutch?) I can't read your script. sad

                        • 9. Re: Help..? Made a mistake. FMP closes at start up
                          lijnbach

                               Hai Phil,

                               I know I can set up user accounts. But the problem is, it is not on file level. In some other lay outs the user is allowed to access the same file. We discussed this before I think, the security is in some cases on a "lay out" level, and not on "file level". (It would be nice to have security on "lay out" level.

                               I think it has something to do with the close button. Because you also exit the lay out with the system "close" button, and I use also a script, something goes wrong. And it also seems only the case with the "Print preview" mode in "Modal" (Dialog) window.

                               Tonight I will try to send you the English versions (as good as possible) of the scripts. (Unfortunately I have to get in my car right away).

                               Hans Lijnbach 

                          • 10. Re: Help..? Made a mistake. FMP closes at start up
                            lijnbach

                                 Hai Phil,

                                 Can I send you an example of a FMP "Test File". I made a small Test database with the same result.

                                 I know, that when you get my file, it will be translated to your language. I think you can see then what happens.

                                 Hans.

                            • 11. Re: Help..? Made a mistake. FMP closes at start up
                              philmodjunk
                                   

                                        it is not on file level. In some other lay outs the user is allowed to access the same file.

                                   I don't understand that at all. It is almost always a really bad idea to let any user except you or a fellow developer have layout mode level access to your file. The uncontrolled, unmonitored changes that they might make to the design of your database could be truly messy. But maybe you didn't really mean "Layout mode"?

                                   And Manage | Security can limit access to specific layouts and even to specific groups of records in a given table.

                                   You can upload a copy (don't include any sensitive information) to a sharing site such as Drop Box and post the download link to it here.

                              • 12. Re: Help..? Made a mistake. FMP closes at start up
                                lijnbach

                                O.K. Phil,

                                      

                                I am sorry I did not explain myself in the right way.

                                      

                                What I mend is, the users have access to a certain table (file) with a lay out. But on this lay out some fields are hidden or not accessible. The manager has access to all the fields (with another lay out). So as well the manger as the users have access tot the same table, with the same properties, but not for all fields.

                                      

                                If I have the “Window bar” visible, at the left side, directly under the bar, there is a drop down that makes all lay outs accessible. And I don’t want users to get access to the lay outs of the manager. 

                                      

                                The reason why I use “Dialog” (Modal) window, is because the Dialog mode disables the button at the right side, with which users can get access to the “lay out mode”.

                                      

                                I build a small file with the same kind of scripts and conditions I am using in my original database.

                                      

                                If you open the file and push the “run script” button, you get a “Dialog window”. Go to another lay out or use the close button, and the window closes. All fine. But is you close the database directly after closing the “Dialog” Window, and start the database again, you get the old window style back in preview mode.

                                      

                                (If there are problems on start up, just puh shift key on start up.

                                This is the link:

                                      

                                https://www.dropbox.com/s/dgvpq63emxcegqy/Test%20databse.fmp12

                                      

                                Thanks,

                                      

                                Hans Lijnbach

                                      
                                • 13. Re: Help..? Made a mistake. FMP closes at start up
                                  philmodjunk
                                       

                                  If I have the “Window bar” visible, at the left side, directly under the bar, there is a drop down that makes all lay outs accessible. And I don’t want users to get access to the lay outs of the manager.

                                  But this is only true if the layout has the "Include in Layout menus" option selected in layout setup. A user with full access can enter layout mode and then all layouts appear in this menu so full access users can still get to every layout.

                                  But you can also set up a script that hides and locks the status tool bar to keep this part of the system inaccessible. you don't need to open a modal window to get that result.

                                       

                                  The reason why I use “Dialog” (Modal) window, is because the Dialog mode disables the button at the right side, with which users can get access to the “lay out mode”.

                                  That button does not appear unless the file is open with a privilege set that permits modifying layouts. Only you or a fellow developer should have that level of access to your database.

                                  Note: I made it a practice years ago to at least hide, if not hide and lock, the status tool bar of all databases intended for general use--providing my own navigation controls for moving from layout to layout and record to record. I did this in part to get better control over how users interacted with the database and in part to get more space to use for my layout as my "button bar" generally takes up about 1/3 the space a status area tool bar takes on a windows system.

                                  • 14. Re: Help..? Made a mistake. FMP closes at start up
                                    lijnbach

                                    "But you can also set up a script that hides and locks the status tool bar to keep this part of the system inaccessible. you don't need to open a modal window to get that result."

                                    That is right Phil, only then I lose the possibility, to scroll threw the pages. As far as I know, I can create a script to scrolls threw the records, but not threw the pages. (At least I cant't find it in Dutch). 

                                    "Note: I made it a practice years ago to at least hide, if not hide and lock, the status tool bar of all databases intended for general use--providing my own navigation controls for moving from layout to layout and record to record. I did this in part to get better control over how users interacted with the database and in part to get more space to use for my layout as my "button bar" generally takes up about 1/3 the space a status area tool bar takes on a windows system."

                                    In a mean while I do the same Phil, I hide the tool bar and use my own buttons etc. The only reason why I was not doing that in this case, is because of the scroll threw pages function. Although I built my own buttons, a button on a print report doesn't look nice. (Or hide it while printing). And something else, you only get the Print report "Titel" in Print preview mode. So, Print preview gives the best result of what the user is getting on paper.

                                    At least you made some things more clear. I will find a way to solve this issue.

                                    Never the less, it still is strange that I get my old window in "Print Preview" back on start up.

                                    Thanks for your time and effort Phil.

                                         Hans Lijnbach.

                                    1 2 Previous Next