Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #6315

Re: How to run cmd line task from within a BASIC program

From Paul Stewart <narrowboat-paul@outlook.com>
Newsgroups comp.sys.acorn.programmer
Subject Re: How to run cmd line task from within a BASIC program
Date 2022-01-20 19:54 +0000
Organization Aioe.org NNTP Server
Message-ID <1d95e7ad59.Paul@outlook.com> (permalink)
References <37b525a459.Paul@outlook.com> <2e3fd371-c4c3-4993-9c94-3ef2d5ec15bbn@googlegroups.com>

Show all headers | View raw


In message <2e3fd371-c4c3-4993-9c94-3ef2d5ec15bbn@googlegroups.com>
          Gerph <gerph@gerph.org> wrote:

> On Saturday, 1 January 2022 at 21:10:47 UTC, Paul Stewart wrote:
>> 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 > <Wimp$ScrapDir>.ifinfo"

> Which won't work because, as you've seen, it replaces your application.
> There is no process control on RISC OS, so you suffer here.

> However, your specific problem is that you want to read (I assume)
> information about the interfaces on the system. This is relatively trivial
> to do. How relative is a subjective matter, but it only needs calls that
> are defined in BSD sockets interfaces used by most systems. Because of
> this they're 'easily' translatable to RISC OS Socket calls. Some years ago
> I created some examples to show how this could be done in BASIC.

> The very old examples can be found on my usenet sharing site
> (https://usenet.gerph.org/Internet/), but a year ago I placed slightly
> improved versions in the RISC OS examples repository at
> https://github.com/gerph/riscos-examples/tree/master/networking/sockets

Managed to do what I was looking at doing using SYS Wimp_StartTask, which 
Harriet pointed me too.

I will however take look at your examples.

-- 
Paul Stewart
Sent from A9home running RISC OS 4.42

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

How to run cmd line task from within a BASIC program Paul Stewart <narrowboat-paul@outlook.com> - 2022-01-01 21:10 +0000
  Re: How to run cmd line task from within a BASIC program Harriet Bazley <harriet@bazleyfamily.co.uk> - 2022-01-02 01:06 +0000
    Re: How to run cmd line task from within a BASIC program Paul Stewart <narrowboat-paul@outlook.com> - 2022-01-02 20:29 +0000
    Re: How to run cmd line task from within a BASIC program Matthew Phillips <spam2011m@yahoo.co.uk> - 2022-01-05 07:58 +0000
      Re: How to run cmd line task from within a BASIC program druck <news@druck.org.uk> - 2022-01-05 18:02 +0000
  Re: How to run cmd line task from within a BASIC program Gerph <gerph@gerph.org> - 2022-01-19 16:53 -0800
    Re: How to run cmd line task from within a BASIC program Paul Stewart <narrowboat-paul@outlook.com> - 2022-01-20 19:54 +0000

csiph-web