samshem Posted June 28, 2007 Posted June 28, 2007 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.
mr_vodka Posted June 28, 2007 Posted June 28, 2007 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.
Genx Posted June 28, 2007 Posted June 28, 2007 Hmm, kind of weird that Windows accepts a forward slash as a valid path in the cmd console.
LaRetta Posted June 28, 2007 Posted June 28, 2007 (edited) 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, 2007 by Guest
Genx Posted June 28, 2007 Posted June 28, 2007 (edited) 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, 2007 by Guest
samshem Posted June 28, 2007 Author Posted June 28, 2007 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.
Genx Posted June 28, 2007 Posted June 28, 2007 Send Event ["avet"; "odoc"; "cmd /k ping " & gIPfield]
samshem Posted June 28, 2007 Author Posted June 28, 2007 Is that supposed to go into the calculation function of Send Event?
mr_vodka Posted June 28, 2007 Posted June 28, 2007 yes. with gIPfield being the field in FM that stores the IP address.
samshem Posted June 28, 2007 Author Posted June 28, 2007 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.
Genx Posted June 28, 2007 Posted June 28, 2007 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
samshem Posted June 28, 2007 Author Posted June 28, 2007 That works great. Thanks everyone for your help.
Recommended Posts
This topic is 6360 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now