Path: csiph.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.uzoreto.com!aioe.org!1mf3IW7nJT6qmjY9+xBS7w.user.gioia.aioe.org.POSTED!not-for-mail From: Kevin Wells Newsgroups: comp.sys.acorn.programmer Subject: Re: Better way to check for wget Date: Mon, 25 Jan 2021 14:24:03 GMT Organization: Aioe.org NNTP Server Lines: 38 Message-ID: <356d64f458.Kevin@Kevsoft> References: NNTP-Posting-Host: 1mf3IW7nJT6qmjY9+xBS7w.user.gioia.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: Messenger-Pro/8.04 (MsgServe/8.04) (RISC-OS/5.29) NewsHound/v1.52-32 X-Notice: Filtered by postfilter v. 0.9.2 Xref: csiph.com comp.sys.acorn.programmer:6252 In message Theo wrote: >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? > >Perhaps something like: > >SYS "XWimp_StartTask", "wget -V" TO ;flags% >IF (flags% AND 2) THEN ... The trouble with that is it brings up the contents of wget -V in a window that has to be closed. Thanks for this, but Ronald May sent me an idea off list, that got me an idea which 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 and if the scrap file exist or not do what is required. > >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 -- Kev Wells http://kevsoft.co.uk/ https://ko-fi.com/kevsoft carpe cervisium I am not an Alcoholic I am a Drunk. Alcoholics go to meetings.