Reading the help file suggests that "Send DDE Execute" MIGHT do what you want. I play with that and see if it works.1 of 1 people found this helpful
I appreciate the advise, however I have looked into using "Send DDE Execute"; it appears that the program called must have a registered service name, not just a file path. Also, the commands sent by it do not pass as simple command-line arguments, which is what I need for the specific program I am trying to call. If I am mistaken in my understanding of this, please let me know.
Amazing what you learn 8 years after the fact.
You might have to include the full path to excel.exe or alter your Windows environment variables to include the path. What version of Windows are you running?
1 of 1 people found this helpful
It looks you entered $command into "text", it should be "calculation" in "send event" step.
But the error is a bit weird, why finding "e" ??
Inside quoted text the \ is the escape character.
which evaluates as
In File:, "excel.exe /" is treated as folder name then find file named "e"
I had never used File: in send event step, so completely forgot it
The \ character never makes it past FileMaker's calculation evaluation of the string.
The typical use of \ in a string in FileMaker is to get " as a character inside a string. If you put this quoted string together:
"Let's put " inside a string"
You'd get an error because the second " would be interpreted as the end of the quoted string and then FileMaker expects an operator as the next token in the expression. So we write it this way using the escape character:
"Let's put /" inside a string"
When evaluated, FileMaker removes the / character, treats the " as just another character and you get:
Lets's put " inside a string
In your case, FileMaker is doing the same thing. It removes the / from the string and treats the letter e as just another character. So to correct, you put in the / twice so that FileMaker removes the first and leaves the second.
A couple things:
I believe most, if not all, command line switches in the Windows OS are prefaced by forward-slashes or by dashes. Example: /e or -e
Back-slashes are how folders and files in paths are separated from each other on Windows.
In user19752 post it sounds like he may be using the syntax : file:excel.exe /e. The file: preface is not necessary when using Send Event but it is needed when using Open URL. I prefer to use Open URL because it utilizes forward-slashes in the path to separate the folder and file elements. Back-slashes are difficult to work with because they are escape characters as philmodjunk noted.
I noticed in the step excel.exe don't need to be full path.
It works for certain programs but in my case, I tried calling a console application located on my Documents folder by supplying the absolute path in the Calculation option of the Send Event script but it didn't work. The script executed with no errors but nothing seems to happen.
Consequently, I tried supplying the variable to the File option of the Send Event and it did work. It opens the console application but now I cannot pass a parameter to the console app. Otherwise it would give an error.