
Execute Script Text - interfacing Igor with Contin

samullin
I just sent this to the email list, but I am not sure if the forums and the list share the same audience.
I am working to interface Igor with a couple of old programs called CONTIN and DISCRETE. In particular, I am using Contin to fit distribution functions to exponential decay data. I can run the program through the Windows command line, using text files as inputs and outputs, with commands like the following:
chdir /d f:\ContinAnalysis\test
contin.exe continDataOutput.txt
My Igor program at present can turn data vs time data into a continDataInput.txt file, and read the results back out of a continDataOutput.txt. The only aspect I'm missing to fully automate this is to run the program from the command line using ExecuteScriptText. However, I have had absolutely no luck with this function - even when paying particular attention to escape characters, including passing the command in quotes as "\"command goes here\"". It looks like there is some promise to use batch files, but I haven't been able to figure out how to write a batch file with the appropriate format either.
Any help would be greatly appreciated!
Regards,
Scott
"Thank you all for the help. I got it to work using some of Jim's advice, along with some code I found on Igor Exchange. The trick was to use the full-paths. I couldn't get it to run all of the commands in a single input, but making a batch file worked out well.
The newest problem I ran into was that after I run PathInfo, the s_path string is in the colon-separated format. I tried several different things, then ended up kludging it with replaceString. I'm happy with it."
The code I used from Igor Exchange is based on the ExecuteWinCmd function by harneit http://www.igorexchange.com/node/938
My code is below:
February 25, 2010 at 05:54 pm - Permalink