controlling subprocesses
martin_helm
martin at mhelm.de
Mon Mar 2 11:12:44 CST 2009
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, 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
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>
I guess you should pass the command arguments as a separate argument to
popen2
popen2('C:\Programme\AutoIt\AutoIt3.exe', { 'd:\comm\octavetest.au3', '7' }
)
- mh
--
View this message in context: http://www.nabble.com/controlling-subprocesses-tp22291527p22292234.html
Sent from the Octave - General mailing list archive at Nabble.com.
More information about the Help-octave
mailing list