December 17, 200718 yr Does anyone know if there is a way to add a command line parameter when executing filemaker... or a filemaker db. e.g. I have a db named "process.fp7" I want to have scheduler run process.fp7 and pass it a parameter of "X12345" sometimes and "X99999" others. Is this possible? In other db's, I just added it to the command line. Thanks, Campbell
December 17, 200718 yr Probably the easiest way is, instead of opening the FMP program directly, open a FMP file with a startup script that does what you want.
December 17, 200718 yr Author Ok... that is exactly my question. Can I pass the startup parameter to the startup script? So... let's say I have an external program write out a text file named: file0009212. Is there a way to queue the startup script to process file0009212... or whatever it may be?
December 17, 200718 yr There may well be a way with AppleScript or VBScript (or whatever the equivalent to AS is on WindOS). I'd imagine the process would go something like: VBScript opens file with command-line parameter, sets paramateer into FMP field, runs script in FMP file that processes the value in the field. Other people on the Forums are wizards with these scripting languages and should be able to help you.
December 17, 200718 yr Author Ok. That makes sense... setting a field externally. I was hoping for a command line variable... but that should work.
December 17, 200718 yr If you are going to do it this way it would be simpler to put the Applescript or, via a free plug-in, a shell script executed in the start up script. Perhaps easier is to place the required parameters in a text file and to import this into a field. This may be best done into a one record table so that the script will be on the record containing the imported value via a 'Show all records' script step. No, if the import succeeds the record will be showing. Zero records showing could be a test for successful import.
December 17, 200718 yr Author That is a great quick fix while I try to figure out the activex insert. Thanks a lot. Campbell
December 17, 200718 yr There is not a way to pass a parameter to filemaker using ActiveX (I've wanted that for years) It is fairly easy to create a text file to store the value and import it as suggested. Athough if there are only two parameters possible you might just write two scripts in filemaker (one for each par.) and execute the appropiate one with the VBS script. (Note: In ver 9 there is a bug with activeX, if you use the script folders feature to organize scripts, active X is likely to call the wrong one, so if you are using activeX and ver9 DON'T use the script folder feature)
Create an account or sign in to comment