February 8, 200521 yr Hi, I'm using FileMaker 6 on Windows XP. 1. Is it possible to create script that calls a BAT file or Windows Script ? 2. How the BAT file or Windows Script can retun a string back to FileMaker? (the result of the execution - failure code or string if succesful) 3.How do I store the returned value in a FileMaker field? If possible, could you please post some sample scripts? Thank you for the help!
February 8, 200521 yr Yes, use the Send Message script step with the path to your batch file and any parameters you may need in the Text box. You can have the batch file populate a text file with the return string and Import the result into a global field in FM. Make sure the text file is deleted at the beginning of the batch script, and have FM loop until the import is successful or a global number field, functioning as a loop counter, exceeds a particular value, e.g. Allow User Abort [Off] Set Error Capture [On] Set Field [gnum, 0] Send Message Loop Import Records [Restore, No dialog, somefile.txt] Exit Loop If [not Status(CurrentError) or gnum = 10000] Set Field [gnum, gnum + 1] End Loop
Create an account or sign in to comment