Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I'm trying to write a script that exports a found set of data to a file named "export.csv", and then have the script tell another application to open that new file. I'm on a Windows machine.

I know how to do the export and write the file, but I can't figure out how to tell the other application to open the file. I've tried SendMessage and SendDDEExecute. With SendMessage, I've successfully opened the file with MS Excel (not what I want) and I've been able to launch the application I'm interested in. But I can't get that app to open the export.csv file.

TIA,

Artie

Posted

The issue is whether the app you want to launch supports command line parameters. If it does, then Send Message will work fine (I use it all the time). What you need to do is save the call to the application (path & file name), as well as the command line into a text field and pass the text field to the Send Message script step. You will need to put the call in double double quotes (""C:my App folderapp.exe"" & " " & "args" ) so it is single quoted, followed by a space and the command line arguments.

Steve

Posted

Thanks. This makes sense. The only thing I'm not sure about is how to figure out what command-line arguments this application accepts, if any. Is there an easy way to figure that out? Do I have to contact the application vendor?

Thanks,

Artie

Posted

I'm replying to my own reply... :-)

I figured out how to open the app and have the app open the file of interest from the Windows2000 "Command Prompt" application. The call I need is:

AppName.exe "filename.csv"

This works well, provided I've already navigated to the directory in which the AppName.exe resides (via cd). In other words, if I type this at the prompt, it doesn't work:

C:Path to AppAppName.exe "filename.exe"

So I don't seem to be able to use the entire pathname in the command. That's one problem.

The other problem is that I still can't seem to get FileMaker to call this command for me from the script, no matter how I format the text I'm passing to the SendMessage script step.

Thanks for any insight you can give me here.

Artie

Posted

In the Specify message of the Send Message script step, check the 2nd radio button called field value and supply a global text field that contains the format with the 2 sets of double quotes as I indicated in my first reply. Follow the call to the application with a " " (1 blank space) and then the command line args.

Steve

This topic is 7762 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.