6 Replies Latest reply on Mar 15, 2017 5:49 AM by Jason Wood

    Disabling the Launch Center




      I have a Filemaker script that runs every day on a schedule.  Basically there's a launchd job, which triggers an AppleScript, and that AppleScript tells Filemaker (Filemaker Pro Advanced v15) to open a database and run a Filemaker script.


      It works just fine if my Mac is "open" (i.e. the computer is unlocked because I'm working at it).  The launchd job triggers, the AppleScript runs, Filemaker opens, opens the required database, executes the script and then Filemaker quits.


      But it doesn't work if the login password is required (i.e. if I've been away from my computer for a while).  In that case what happens is the launchd job runs, the AppleScript runs, Filemaker opens ... and then stops at the Launch Centre screen.  It doesn't open the nominated database or execute the script.


      Question 1:  Is there a way to tell Filemaker to not show you the Launch Centre.  Really, I don't need it.  And I suspect the AppleScript might work if Launch Centre was switched off.


      Question 2:  Has anyone got other suggestions for how to get Filemaker Pro Advanced to execute a script on a schedule, without the computer needing to be unlocked?

        • 1. Re: Disabling the Launch Center
          Jason Wood

          Sounds like the difference between working or not working is whether FileMaker is open or not. If it's not open, the Launch Centre will come up when the app is launched.


          You're suggesting it has to do with whether the screen is locked, but I'm not understanding this since it sounds like you've found a way past that anyway.


          Couldn't you solve this by using AppleScript to open the FileMaker File instead of opening FileMaker?


          Regardless of whether FileMaker is open or closed, or whether the Launch Centre is open or closed, opening the file will open FileMaker, bypass the Launch Centre, and open the file.


          Is this file hosted? If so - stop everything and set up a server scheduled script!

          • 2. Re: Disabling the Launch Center
            Benjamin Fehr

            Not sure if I get this right, but when I open a solution by double-clicking/open the primary file (MyFile.fmp12), it will prompt FMPA to launch and no Launch Center appears.

            • 3. Re: Disabling the Launch Center

              Have you considered a dedicated computer running either FM Server, or FileMaker Pro permanently left running with on-timer script. Much more reliable, far less moving parts.

              • 4. Re: Disabling the Launch Center

                The AppleScript reads:


                  tell application "FileMaker Pro Advanced"


                     open "[database name]"

                     tell database "[database name]"

                        do script "[script name]"

                     end tell

                     close database "[database name]"

                     quit application "FileMaker Pro Advanced"

                end tell


                As long as my computer is unlocked then this works fine.  But if the computer is locked (i.e. in System Preferences | Security & Privacy I have a login password that is required [x] minutes after sleep or screen saver begins) then that AppleScript fails at the second line ("activate").  That line just hangs at the Launch Centre and the next line, to open the database, doesn't execute.


                I've tried the AppleScript without the "activate" line but then the AppleScript doesn't work.


                Any thoughts anyone?

                • 5. Re: Disabling the Launch Center
                  Benjamin Fehr

                  I'm not familiar with AppleScript, but would it be possible to skip that 'tell application "FM Pro Advanced"' and just use kind of a 'open [MyPrimaryFile.fmp12]' instruction?

                  • 6. Re: Disabling the Launch Center
                    Jason Wood

                    I don't think the problem has anything to do with the Launch Centre. The problem is the locked screen.


                    But in case I'm wrong...


                    Try adding this at the beginning, before "tell application "FileMaker Pro Advanced". Then you can remove "open "[database name]"


                    tell application "Finder" to open "path:to:file name.fp12"