Page 1 of 1

Directing returned code to NIL (SOLVED)

Posted: Fri Aug 09, 2013 6:40 pm
by AmigaPhil
Sorry if this has already been signaled.

One of my DOS scripts opens a shell window showing the return code, but it should not (it doesn't on OS3).
The command doing this is:

Code: Select all

rx >NIL: SpamFryer.rexx
Same problem after extracting archive using the contextual menu : a shell window opens with return code 10.
In ExtractArc.rexx :

Code: Select all

'xadunfile >NIL: 'file' DEST='path

The NIL: device is not behaving like in OS3 ?



Edit : (About ExtractArc.rexx)

The "Command returned 10" is caused by this line:

Code: Select all

window windows path open
I don't know what it is supposed to do, but there is no "window" command.

Code: Select all

which window
(no such command in the path)



My question about NIL: remain :

Code: Select all

rx >NIL: SpamFryer.rexx
- on OS3, the return code is not shown.
- on OS4, the return code (5) is shown. Why ?

Note: SpamFryer returns code 5 if, for example, there is no waiting mail in the queried POP server. This is intended.
However, there is no point showing this code when run from workbench (iconx icon). It can confuse the user and let him think that something went wrong with the script.

Re: Directing returned code to NIL

Posted: Fri Aug 09, 2013 9:19 pm
by gazelle
In AmigaOS 4 the error output must be redirected seperatly with "*>"

Code: Select all

rx >NIL: *>NIL: SpamFryer.rexx
should work

Re: Directing returned code to NIL

Posted: Fri Aug 09, 2013 9:46 pm
by AmigaPhil
gazelle wrote:In AmigaOS 4 the error output must be redirected seperatly with "*>"

Code: Select all

rx >NIL: *>NIL: SpamFryer.rexx
should work
Yes, it works. Thanks ! :)

Any incidences if I add this "*>NIL:" under OS2/OS3 ?