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


Groups > comp.sys.acorn.programmer > #6588 > unrolled thread

Using WGET from basic

Started byPaul Stewart <phorefaux@gmail.com>
First post2026-01-11 17:11 +0000
Last post2026-01-12 18:23 +0000
Articles 4 — 3 participants

Back to article view | Back to comp.sys.acorn.programmer


Contents

  Using WGET from basic Paul Stewart <phorefaux@gmail.com> - 2026-01-11 17:11 +0000
    Re: Using WGET from basic Harriet Bazley <harriet@bazleyfamily.co.uk> - 2026-01-12 01:28 +0000
      Re: Using WGET from basic Paul Stewart <phorefaux@gmail.com> - 2026-02-08 16:47 +0000
    Re: Using WGET from basic Kevin Wells <kev@kevsoft.co.uk> - 2026-01-12 18:23 +0000

#6588 — Using WGET from basic

FromPaul Stewart <phorefaux@gmail.com>
Date2026-01-11 17:11 +0000
SubjectUsing WGET from basic
Message-ID<3e719a995c.Paul@phorefaux>
Hi all,

Recently started using WGET to fetch some files.
Is it possible to call this from a basic program and it mulitask in the 
background?

I have it working without issue from a basic program, it just single tasks 
whilst it's downloading.  Currently using: -

command$="wget "+webfilepath$+" -O "+scrapfilepath$+wgetoptions$ + " 
--show-progress"
SYS"XWimp_StartTask",command$

Added the --show-progress just so I can see it's doing something.

-- 
Paul Stewart
Sent from A9home running RISC OS 4.42

[toc] | [next] | [standalone]


#6589

FromHarriet Bazley <harriet@bazleyfamily.co.uk>
Date2026-01-12 01:28 +0000
Message-ID<bcf6c7995c.harriet@bazleyfamily.co.uk>
In reply to#6588
On 11 Jan 2026 as I do recall,
          Paul Stewart  wrote:

> Hi all,
> 
> Recently started using WGET to fetch some files.
> Is it possible to call this from a basic program and it mulitask in the 
> background?

You need to launch that sort of thing in a taskwindow if you want it to
multitask.  But then of course you will need some way to know when it is
finished, because if it is multitasking that means that your program
could also be taking other actions (i.e. receiving keypresses or Wimp
messages) while wget is busy getting a file via the Web.

!Infozip has a procedure called FNchildtask which launches a task (in
the format "TaskWindow" plus command line options) and returns the task
handle as the result of that function.
It then listens out for the WIMP message TaskCloseDown (&400C3) with
that task handle being broadcast, which means that the child task has
finished and the application can now act upon its results.  You need to
make sure that you have included message &400C3 in the list of
user messages specified during the Wimp_Initialise stage, though, or you
will never receive it.   :-)

-- 
Harriet Bazley                     ==  Loyaulte me lie ==

Some people cause happiness wherever they go; others, whenever they go.

[toc] | [prev] | [next] | [standalone]


#6591

FromPaul Stewart <phorefaux@gmail.com>
Date2026-02-08 16:47 +0000
Message-ID<a7a503a85c.Paul@phorefaux>
In reply to#6589
In message <bcf6c7995c.harriet@bazleyfamily.co.uk>
          Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:

> On 11 Jan 2026 as I do recall,
>           Paul Stewart  wrote:

>> Hi all,
>> 
>> Recently started using WGET to fetch some files.
>> Is it possible to call this from a basic program and it mulitask in the
>> background?

> You need to launch that sort of thing in a taskwindow if you want it to
> multitask.  But then of course you will need some way to know when it is
> finished, because if it is multitasking that means that your program
> could also be taking other actions (i.e. receiving keypresses or Wimp
> messages) while wget is busy getting a file via the Web.

> !Infozip has a procedure called FNchildtask which launches a task (in
> the format "TaskWindow" plus command line options) and returns the task
> handle as the result of that function.
> It then listens out for the WIMP message TaskCloseDown (&400C3) with
> that task handle being broadcast, which means that the child task has
> finished and the application can now act upon its results.  You need to
> make sure that you have included message &400C3 in the list of
> user messages specified during the Wimp_Initialise stage, though, or you
> will never receive it.   :-)

Thanks to Kevin and Harriet,for your comments on this.  A bit more looking 
through the old CSA.programmer postings and the PRMS, and have doing what 
I was looking for.

-- 
Paul Stewart
Sent from A9home running RISC OS 4.42

[toc] | [prev] | [next] | [standalone]


#6590

FromKevin Wells <kev@kevsoft.co.uk>
Date2026-01-12 18:23 +0000
Message-ID<20e2249a5c.Kevin@Kevsoft>
In reply to#6588
In message <3e719a995c.Paul@phorefaux>
          Paul Stewart <phorefaux@gmail.com> wrote:

>Hi all,
>
>Recently started using WGET to fetch some files.
>Is it possible to call this from a basic program and it mulitask in the
>background?
>
>I have it working without issue from a basic program, it just single tasks
>whilst it's downloading.  Currently using: -
>
>command$="wget "+webfilepath$+" -O "+scrapfilepath$+wgetoptions$ + "
>--show-progress"
>SYS"XWimp_StartTask",command$
>
>Added the --show-progress just so I can see it's doing something.
>

If you write to the wget command to an obey file (feb) then do a

OSCLI("Filer_Run path to obey file") that will return control to the
computer straight away, then you would need to check to see that the
file has been downloaded.

If you use the -S -o switches which is -S the Server response and the -o
is saves a log file, that could go in the same directory as the download
perhaps call it log? And then you would need to check that the log file
is closed.

I presume their is a command for that?


-- 
Kev Wells
https://kevsoft.co.uk/  https://ko-fi.com/kevsoft
carpe cervisium
Useless Fact 04 The number of islands around mainland Britain is 6289.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web