9 Replies Latest reply on Jun 1, 2014 4:41 PM by HugoLidia

    HOw to generate or run a ping test



      HOw to generate or run a ping test


           Environment : Windows 8.1, FM 13 PRo Adv - Local user network

           Once a new client has been entered onto the database, we record their assigned IP address.  I want to click a button that runs a ping test as e.g. from the Run Command line (ping and report back,

           1. if the result is successful or NOT

           2. if the ping is more than a set time e.g. 150ms to report the value as "ping successful but slow at xxxms"


           Anyone know if this is possible and how I generate a script to do this?




        • 1. Re: HOw to generate or run a ping test

               You'd need to use either a plug in, if one exists that offers this capability, or use FileMaker to run a system script such as a batch file of the needed command lines. But this is system specific. Are you using a mac or windows system to do this?

          • 2. Re: HOw to generate or run a ping test

                  As per post - Windows 8.1, local area network


                 A simple ping.bat file can be run, which would have the ping variable passed to it so might read as "ping"

                 Cant find;

                 1. how to run a bat file from within windows.

                 2. how to pass the variable to the file ( as the IP address is different for each client)

                 3. how to capture results (so it can be analysed)

                 Any good reference books that people can recommend ?


            • 3. Re: HOw to generate or run a ping test
              1.           Simply opening a BAT file runs it.
              3.           A method that I have used is to set up a table of text fields where each record is one command line. To use a specific IP address then is simply a matter of adding that text to a text field in this table. (I usually have one field for the command, one for the parameters and export only a calculation field that combines the two into the needed command line.)
                          You then use export records to export this to a text field, specifying a file name that includes the .BAT file extension. There's an option you can use to have this file be automatically opened when it is exported so you can export the records to a text file in the temporary folder and it will be opened and run automatically.
              5.           I don't know if this is possible with the Ping command line, but most such command lines can have their output redirected to a text file. FileMaker can thus export the records to create and run the batch file, pause for a few seconds to allow the Ping command to generate the needed text file and then this text can be imported back into FileMaker in order to display (and keep if you need this) the results.
              • 4. Re: HOw to generate or run a ping test

                      Thank you for the feedback PhilModJunk - fully understand and know I can do create table  with fields for command(s) and parameters etc, but cant find anything in online help nor this forum on the get to bat file to run from the command line.  Could you clarify that bit please. 



                • 5. Re: HOw to generate or run a ping test

                       You don't need to run the BAT file from the command line. You run it from FileMaker. That's the point in having FileMaker automatically open the file immediately after using export records to create the BAT file in the first place.

                  • 6. Re: HOw to generate or run a ping test

                         I appreciate that you are a much more seasoned Filemaker developer than I will ever be PHilModJunk, but when you talk about opeing a file with Filemaker, the little documentation there is within FIlemaker and other books I have looked at, says

                         Opening files
                    You can open FileMaker Pro files located on your computer. You can open single files or multiple files at the same time.

                           So okay, you can open Filemaker files, as one would hope, but then there is nothing further about how to open "other types of files"


                         I have looked at the DDE Execute statement, but that can execute programs like linking to a URL and oening the web page, but does not allow you to control the results.


                         So, can I impose on you further and ask psecifically how you recommend opening the bat file to execute it from within Filemaker and analyse the results


                    • 8. Re: HOw to generate or run a ping test

                           If you take a look at the export files script step, you'll find that there is a check box that you can select that automatically opens the exported file. If this is a file with the .BAT extension in a Windows system, this will cause the windows OS to run the BAT file of command line instructions just as though you had double clicked the file.

                      • 9. Re: HOw to generate or run a ping test

                              Thanks to PhilModJunk - I'll look at that.  Thanks for the pointer.

                             DavidAnders - link is very useful.  Long, interesting read, which I now need to paly with. MooPLug sounds interesting ( and it is still FREE )- albeit I appreciate the warnings given about using 3rd party plugins, but it is an option to get things up and running and then replace with native code.


                             I will comeback once I have my solution running to let others know.