June 28, 200718 yr I am trying to figure out a way to automatically launch the ping command built into Windows and automatically put in the address to ping from a field within the FM database. I managed to have the script launch a command prompt window by using the send event command. I think the next step would be to use the Send DDE Execute command, but I do not know what to put in the Topic field of that script step. Does anyone know if this is possible? Thanks in advance for any help you can provide.
June 28, 200718 yr You can try something like this. Send Event ["avet"; "odoc"; "cmd /c ping " & gIPfield & " > C:/Pingresult.txt" Then import the C:/Pingresult.txt file into a FileMaker field to view the results.
June 28, 200718 yr Hmm, kind of weird that Windows accepts a forward slash as a valid path in the cmd console.
June 28, 200718 yr Actually it is not. DOS has always recognized forward slash as parameter. Example: Dir /p will list the directory contents and the parameter /p pauses after each screen display. Edited June 28, 200718 yr by Guest
June 28, 200718 yr righto, sorry, never used dos lol And besides, i said it was odd that it accepted it in a file path... never said anything about the parameters. ... But after googling a bit it turns out file paths are interchangeable in windows i.e. OR / .. but what really happens is that the / are converted to ... any who. Edited June 28, 200718 yr by Guest
June 28, 200718 yr Author You can try something like this. Send Event ["avet"; "odoc"; "cmd /c ping " & gIPfield & " > C:/Pingresult.txt" Then import the C:/Pingresult.txt file into a FileMaker field to view the results. Thanks for the reply. I do not need to have the results in a Filemaker field, only ping an IP address in a Filemaker field viewing the results in the ping window. Is there a way that can be done using the command you posted? Thanks.
June 28, 200718 yr Author Ok, I tried it, but it will not accept it. Are all parameters correct short of the field name? I assume to remove the "Send Event" part of that calculation as FM would look for a table called Send Event. Pardon my ignorance in using this script step as I have never used it before. Thanks for all your help.
June 28, 200718 yr Send Event is a script step (represented by the fact that it is enclosed in square brackets). Go To Scripts -> ScriptMaker. Make a new Script call it Ping or something. Look for the script step called "Send Event". Click Specify once you've added the step to your script. Choose calculation and click specify. the only part that goes into the calculation is: "cmd /k ping " & gIPfield
Create an account or sign in to comment