Article View: demon.tech.amiga
Article #567Re: Arexx again
From: Neil Bothwick
Date: Thu, 10 Jun 1999 00:00
Date: Thu, 10 Jun 1999 00:00
60 lines
2225 bytes
2225 bytes
Stephen Bridges said,
> I'm planning to give myself the choice between mail, news, mail&news and
> none. But the problem is that I'd like the mail&news choice to run
> concurrently. So the question is what is the best way to get an arexx
> script to launch two processes at once. The best I came up with was:
> SELECT
> WHEN choice = 2 THEN getmail()
> WHEN choice = 3 THEN getnews()
> WHEN choice = 1 THEN DO
> ADDRESS COMMAND
> 'rx rexx:getmail.rexx'
> 'rx rexx:getnews.rexx'
> END
> OTHERWISE EXIT
> END
> EXIT
> Where getnews.rexx and getmail.rexx are just getmail() and getnews() as
> seperate scripts.
You need to "run" the scripts, and presumably wait for them both to exit
before you disconnect. Something like
setclip('downloads',0)
at the start, then
WHEN choice = 1 THEN DO
ADDRESS COMMAND
'run >NIL: rx rexx:getmail.rexx'
'run >NIL: rx rexx:getnews.rexx'
do while getclip(downloads) > 0
call delay(25)
end
END
and put
call setclip('downloads',getclip(downloads)+1))
at the start of each of the mail and news scripts and
call setclip('downloads',getclip(downloads)-1))
at the end.
> If there is a more elegant way I'd like to hear, also if
> there is a 'proper' way to execute an arexx script inside another.
Using "address command" is about as clean as it gets. You don't need
rx if the script bit is set on the script.
Neil
--
Neil Bothwick, Warrington, England - http://www.wirenet.co.uk
Thesaurus: ancient reptile with an excellent vocabulary
Technical Details
Message-ID:
<1607.830T1531T14163821neil@wirenet.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<b1.m0.I22sID1aki45uDP55.NR@bh01.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1160fd,4a7c0a01d4d2526,start X-Google-Attributes: gid1160fd,public From: "Neil Bothwick" <postmaster@wirenet.co.uk> Subject: Re: Arexx again Date: 1999/06/10 Message-ID: <1607.830T1531T14163821neil@wirenet.co.uk> X-Deja-AN: 488095236 References: <b1.m0.I22sID1aki45uDP55.NR@bh01.demon.co.uk> X-Complaints-To: news@u-net.net X-Info: The UK's first Amiga-only Internet Access Provider X-Trace: newsr2.u-net.net 929054743 194.119.174.218 (Thu, 10 Jun 1999 23:45:43 BST) Organization: Wirenet Amiga Internet NNTP-Posting-Date: Thu, 10 Jun 1999 23:45:43 BST Newsgroups: demon.tech.amiga