[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: controlling subprocesses

From: martin_helm
Subject: Re: controlling subprocesses
Date: Mon, 2 Mar 2009 09:12:44 -0800 (PST)

Michael Grossbach wrote:
> 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, - 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
> _______________________________________________
> Help-octave mailing list
> address@hidden

I guess you should pass the command arguments as a separate argument to

popen2('C:\Programme\AutoIt\AutoIt3.exe', { 'd:\comm\octavetest.au3', '7' }

- mh

View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]