Path: news.daimi.aau.dk!Morten.Grouleff From: Morten Grouleff Newsgroups: daimi.beta Subject: Re: Arguments to external processes Date: 14 Sep 1998 20:13:48 +0200 Organization: This posting is not sponsored by any organization. Lines: 42 Message-ID: References: <35FD3144.B13FE109@daimi.aau.dk> NNTP-Posting-Host: munin.mjolner.dk Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: xinwen.daimi.aau.dk 905796830 20442 255.255.255.255 (14 Sep 1998 18:13:50 GMT) X-Complaints-To: news@daimi.aau.dk NNTP-Posting-Date: 14 Sep 1998 18:13:50 GMT X-Newsreader: Gnus v5.5/Emacs 19.34 Xref: news.daimi.aau.dk daimi.beta:10366 Bo Normann Pedersen writes: > I have run in to a little problem ! > > Say I wan't start a program 'fun' from my betaprogram, so I use the > BETA-processmanager and I write something like this : > > OnMouseDown:: > (# do (if DoubleClick then > 'fun' -> > mpgProcess.init; > mpgProcess.start; > if); > #); > > Where the program 'fun' is placed in the same dir where I run my > beta-program. > Now I want to start the external program with an argument, fx 'fun > Onthis'. How is that done. I can't seem to get it right from the > procesmanager.bet file. I don't know what to write ! The code above is not correct. The name has to be given to init. Arguments are passed to arguments.append: OnMouseDown:: (# fun: @Process; do (if DoubleClick then 'fun' -> fun.init; 'Onthis' -> fun.arguments.append; fun.start; if) #) Look at the demos to find out how to detect when fun terminates. It is in fact mandatory to call awaitStopped after the process has terminated to stop the process from becomming zombie. If your program is short-lived, this may not be a problem for you. -- ** Morten Grouleff: ** ** Earthworm Jim PC: ** ** Mjølner Informatics: **