Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Ronald Newsgroups: comp.sys.acorn.programmer Subject: Re: Calling Ghostscript from BASIC Date: Sat, 13 Jun 2020 13:01:42 +1200 Organization: - Lines: 46 Message-ID: <1a0cb87f58.beeb@-.-> References: <587d6e2a47rhnews@dsl.pipex.com> <20b36f7d58.harriet@bazleyfamily.co.uk> <92818e7d58.harriet@bazleyfamily.co.uk> <54d9f07d58.harriet@bazleyfamily.co.uk> Injection-Info: reader02.eternal-september.org; posting-host="095905a8db1795906bac574cede3b3e5"; logging-data="29779"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Qm7nj38DAIJwbQLqx4idh" User-Agent: Messenger-Pro/1.00c (MsgServe/1.00a) (RISC-OS/5.24) NewsHound/v1.50-32 Cancel-Lock: sha1:mn8SrWw84BC7NZdPt7Au8E8gMC0= Xref: csiph.com comp.sys.acorn.programmer:6150 In message <54d9f07d58.harriet@bazleyfamily.co.uk> Harriet Bazley wrote: > On 9 Jun 2020 as I do recall, > druck wrote: > > > On 08/06/2020 21:15, Harriet Bazley wrote: > > > On 8 Jun 2020 as I do recall, > > > Martin Wuerthner wrote: > > >> Then, you listen for the messages that TaskWindows sends to the > > >> given handle (i.e., to your application since you passed your own > > >> task handle), most notably TaskWindow_Ego, which tells your > > >> application the handle of your child. > > > > > > Ah, that looks *much* more elegant than hacking around by doing literal > > > string comparisons (which sounds like a recipe for obscure bugs in the > > > future)... except that from the StronHelp manuals it sounds rather as > > > if you need to duplicate all functionality of the Taskwindow handler > > > yourself, e.g. when the child task produces output, you need to display > > > the data. :-( > > > > You don't have to display the TaskWindow's task's output in a scrolling > > window. If you are calling a program to process a file (as in this case > > with Ghostscript) the only output you are interested in is error > > messages, and you can capture this output and display in an error box. > > > Yes, but from Infozip's point of view I'm launching a program which can > potentially prompt the user for input (and will hang mysteriously if it > fails to get it). Unfortunately detecting the identity of the child > with TaskWindow_Ego doesn't sound as if it will work, if I can only do > that by taking over the entire taskwindow handling myself. > > I'd like to be able to use return codes from a unixlib program but when called from an Obey file. It looks like the only way to do this would be to have either a BASIC or C wrapper/shell to do the running. The only advantage would be that it could set a system variable that an Obey file could read for any programs return code, avoiding setting the system variable in every individual (ported) program. Don't know how well this would work or if it would help Harriets case. Ronald