Path: csiph.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!feeder1.feed.usenet.farm!feed.usenet.farm!aioe.org!4X5OkOiARHvxoDBZHDK13w.user.46.165.242.75.POSTED!not-for-mail From: Paul Stewart Newsgroups: comp.sys.acorn.programmer Subject: How to run cmd line task from within a BASIC program Date: Sat, 01 Jan 2022 21:10:39 GMT Organization: Aioe.org NNTP Server Lines: 24 Message-ID: <37b525a459.Paul@outlook.com> Injection-Info: gioia.aioe.org; logging-data="52869"; posting-host="4X5OkOiARHvxoDBZHDK13w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Messenger-Pro/8.05wpb1 (RemoteNB/3.13) (RISC-OS/4.42) X-Notice: Filtered by postfilter v. 0.9.2 X-Editor: EmailEdit 2.04 Xref: csiph.com comp.sys.acorn.programmer:6299 Hi, I have a little WIMP program I have written in BASIC. As part of the Run file, it runs a *command and out puts results to a file. This works fine. However I would like to be able to run the same command within a procedure in the program to allow the file to be refreshed. I have tried using SYS "OS_CLI","ifconfig -a > .ifinfo" This has the desired effect, being that it sends output of ifconfig -a to the ifinfo file in the scrap folder. However the program stops at this point :( Having opened a task window, and entered BASIC. Running the above SYS command exits BASIC and returns to command prompt. Obviously the same is occurring when attempting to run as part of the program and explains why it just stops without any error. Is SYS "OS_CLI" the correct command I should be using for this? Or is there another equally simple command to use that allows the program to continue after it has run? -- Paul Stewart Sent from A9home running RISC OS 4.42