7 Replies Latest reply on Oct 9, 2009 12:53 PM by philmodjunk

    Send Event Script Step issue with filename argument

    bearhart74_1

      Summary

      Send Event Script Step issue with filename argument

      Description of the issue

      Send Event [“”; “”; “”] When path to "" contains spaces send event fails even thought it is a valid path to an existing, executable file. Seen from Windows XP client running FMPA 10v3 to a database running on FMSA 10 over Windows 2003

        • 1. Re: Send Event Script Step issue with filename argument
          TSGal

          bearhart74:

           

          Thank you for your post.

           

          Unfortunately, I am unable to duplicate the problem.  This is what I did:

           

          1. I have a file being hosted on FileMaker Server 10 Advanced (default FMServer_Sample.fp7) with Windows 2003 Server.

           

          2. On my Dell Dimension using Windows XP SP3, I launch FileMaker Pro 10.0v3 Advanced and remotely connect to the file.

           

          3. I create a script that executes the Send Event command.  I specify the File to be:

           

          file:../../../Program Files/Adobe/Reader 8.0/Reader/AcroRd32.exe

           

          I execute the script, and it launches Adobe Acrobat Reader.

           

          Please let me know what I am doing differently than you, and I will try to replicate the problem.

           

          TSGal

          FileMaker, Inc.

          • 2. Re: Send Event Script Step issue with filename argument
            bearhart74_1
              

            Here is exactly what I am trying to do..

             

            I have a file called GFLA.bat that is in the \\server name\C:\program files\fmsa....\Scripts folder of a network connected filemaker server machine.

             

            GFLA.bat simply starts a google code utility called xml-dir-listing via its associated .bat file and passes parameters into it for execution.

             

            GLFA.bat then moves the output file to a staging location for import into FMP.

             

            (see code below)

             

             

             

            Their are two logical drives on the server C: and D:

             

            Server drive C contains the OS win server 2003 and filemaker server adv v10 installed in the default location

             

            Server drive D is a documents and backups storage drive

             

             

             

            Here is the contents of the GFLA.bat file...

             

            REM start xml dir listing program

            START D:\Utilities\xml-dir-listing.0.2\bin\xml-dir-listing -o D:\Utilities\xml-dir-listing.0.2\bin\FileList.xml "D:\ScannedProductionRecords\Files"

            MOVE /y D:\Utilities\xml-dir-listing.0.2\bin\FileList.xml "C:\Program Files\FileMaker\FileMaker Server\Data\Documents\"

            EXIT

             

            GLFA.bat file works perfectly when I execute it while remotely logged onto the server.

             

            I am attempting to write a script in FMP that conducts and import of the .xml document via layout button click AND via server side script schedule.

             

            How to write Send Event ("aevt"; "odoc" ; path to GLFA.bat) make it work with a layout button trigger AND run from script schedule?

             

            • 3. Re: Send Event Script Step issue with filename argument
              TSGal

              bearhart74:

               

              Thanks for the additional information.

               

              Yes, Send Event from the Server will not work.  Using FileMaker Pro Advanced, access the file and go into ScriptMaker.  When you edit the script, go to the bottom pop-up below "Show Compatibility" and select "Server".  You will see that "Send Event" for Server is not compatible.  Instead, you may want to create a Windows 2003 script that executes at the same time every day.

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Send Event Script Step issue with filename argument
                bearhart74_1
                  

                Ok so that answers part of my question. Now I know that I have to execute the .bat and then execute the data consumption script as seperate server scheduled events. I'll experiment and get that part to work tomorrow...

                 

                The last part of my question was...how do I trigger the .bat file using send event script step when the script that contains the send event command is NOT a server scheduled event but will be triggered by a button click on a layout in a .fp7 db served up by the server?

                 

                Was their something i didnt understand about your reply?

                 K

                • 5. Re: Send Event Script Step issue with filename argument
                  philmodjunk
                    

                  You can use windows task manager to execute the batch file on your server. I do something similar with a VBScript file to copy back up files to an external drive as this script can't be performed as a Server scheduled script anyway.

                  • 6. Re: Send Event Script Step issue with filename argument
                    bearhart74_1
                      

                    I figured out the OS script side of the solution...

                     

                    1. created a .vbs script that sucessfully activates the file list utility and produces my .xml file in response to a server scheduled system event.

                     

                    Next to do's are...

                     

                    2. create a FM script that uses send event to trigger script 1 then conducts data import in response to a button click.

                    3. create a script that can be triggered by a server scheduled event that conducts the data import only (hopefully same script as above)

                    4. tie 1 and 3 together as a script sequence

                     

                    Ill report on my progress.

                     

                    Thanks for putting up with me.

                    K

                    • 7. Re: Send Event Script Step issue with filename argument
                      philmodjunk
                        

                      "create a script that can be triggered by a server scheduled event that conducts the data import only (hopefully same script as above)"

                       

                      There are significant limitations to server scheduled scripts that use import records. See this knowledgebase article: KB 7035