Jump to content
Server Maintenance This Week. ×

calling BAT files and/or Windows Script


This topic is 7016 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 7016 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.