controlling subprocesses
Michael Grossbac
michael at grossbach.org
Mon Mar 2 10:34:32 CST 2009
The manual (ch. 37.5) suggests popen and popen2 for communication
between Octave and other processes. I tried to interface AutoIt
(v3.3.0.0, http://www.autoitscript.com/) - a Basic dialect - through
popen2 but somehow got stuck. I am quite sure that I make a mistake on
the Octave side but cannot find what I am doing wrong. Maybe someone on
the list can enlighten me. Here's what I do:
The Basic script octavetest.au3 takes a command line argument and shows
it in a message box. This works fine if I call it from the prompt in a
DOS box on Windows XP:
U:\>C:\Programme\AutoIt\AutoIt3.exe d:\comm\octavetest.au3 7
As expected, the message box shows a 7 (if I change the command line
argument the value shown changes accordingly).
If octavetest.au3 is called from Octave as in:
octave-3.0.3.exe:3>popen2('C:\Programme\AutoIt\AutoIt3.exe
d:\comm\octavetest.au3 7')
[the above on one line!] Octave responds with
error: popen2: process creation failed
Interestingly,
octave-3.0.3.exe:4>popen2('C:\Programme\AutoIt\AutoIt3.exe')
does start AutoIt but obviously without running the script octavetest.au3
I'd be grateful for any hints and pointers.
Thanks, Michael
More information about the Help-octave
mailing list