Is their a better way to check for wget, either in the !Run obey file or
in the main application file in BASIC to check for wget?
Is their a better way to check for wget, either in the !Run obey file or
in the main application file in BASIC to check for wget?
Kevin Wells <k...@kevsoft.co.uk> wrote:
Is their a better way to check for wget, either in the !Run obey file or in the main application file in BASIC to check for wget?Perhaps something like:
SYS "XWimp_StartTask", "wget -V" TO ;flags%
IF (flags% AND 2) THEN ...
Kevin Wells <kev@kevsoft.co.uk> wrote:
Is their a better way to check for wget, either in the !Run obey file or
in the main application file in BASIC to check for wget?
Perhaps something like:
SYS "XWimp_StartTask", "wget -V" TO ;flags%
IF (flags% AND 2) THEN ...
I think you have to use Wimp_StartTask because if you use OS_CLI there's a >risk of replacing your BASIC program with the wget application and being >unable to return when it finishes.--
This is a check that wget is either somewhere on your Run$Path or an alias >and can successfully execute - if you can run 'wget -V' you know you have a >functioning program, whereas not being in an expected place is only one of >the things that could go wrong.
Theo
On 20/01/2021 20:58, Kevin Wells wrote:
[...]
Is their a better way to check for wget, either in the !Run obey file or
in the main application file in BASIC to check for wget?
[As well as the current method of checking for a system variable]
Off the top of my head, something along the lines of:
IfThere "<Boot$Dir>.Library.wget" then Set <MyApp$WGet>
If "<Wget$Dir>" <> "" THEN Set <MyApp$WGet>
If "<MyApp$Wget>" = "" THEN Error message
Not sure how sensible that is, TBH, having never needed to do something >similar. (And not having a RISC OS machine switched on to check. e.g. is >there a specific variable used for the library directory? Any other
locations it could potentially be squirrelled away in? etc.)
I'm implementing in the application BASIC file rather than
the !Run file, in which I use X wget and send the log into the
applications scrap file
Off the top of my head, something along the lines of:
IfThere "<Boot$Dir>.Library.wget" then Set <MyApp$WGet>
If "<Wget$Dir>" <> "" THEN Set <MyApp$WGet>
If "<MyApp$Wget>" = "" THEN Error message
In article <356d64f458.Kevin@Kevsoft>,
Kevin Wells <kev@kevsoft.co.uk> wrote:
I'm implementing in the application BASIC file rather than
the !Run file, in which I use X wget and send the log into the
applications scrap file
You could always send it to null by redirection.
John
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 03:08:05 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,422 |