Discussion:
Octave process through CreateProcess API-call
(too old to reply)
Kalle
2006-08-10 17:40:46 UTC
Permalink
Dear all,

I have now googled a while, but have not found a solution....

My problem is to run the Octave script drom Delphi executable with
CreateProcess API-call. Basically it should success just by calling "octave
scriptfile" as a parameter in CreateProcess, but... It works something like
that in Unix environment, but at least I have not got it to work in Windows.
I have now tried all possible alternatives in MS-DOS prompt, but without
success.

Question: How should I start/call Octave from MS-DOS prompt to process the
script file without opening the terminal window?

Regards,

Kalle
Kalle
2006-08-10 18:05:02 UTC
Permalink
And at least one method is:

1) Create new Shell file for example "testfile.sh"

2) Include following:
#!/bin/sh
# This script is executed under sh.exe to start octave and to run code from
"testfile.m"
export
PATH="/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WIND
OWS/System32/Wbem:/usr/lib/lapack"
export HOME="/octave_files"
cd "$HOME"
octave.exe testfile.m
rm -f /tmp/*

3) Maybe some of above parameters can be removed, but this version was
modified from octave.sh

4) Run in MS-DOS prompt "sh testfile.sh"

5) Here we are :-)

Regards,

Kalle
Post by Kalle
Dear all,
I have now googled a while, but have not found a solution....
My problem is to run the Octave script drom Delphi executable with
CreateProcess API-call. Basically it should success just by calling "octave
scriptfile" as a parameter in CreateProcess, but... It works something like
that in Unix environment, but at least I have not got it to work in Windows.
I have now tried all possible alternatives in MS-DOS prompt, but without
success.
Question: How should I start/call Octave from MS-DOS prompt to process the
script file without opening the terminal window?
Regards,
Kalle
Loading...