Directing returned code to NIL (SOLVED)

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
AmigaPhil
Posts: 15
Joined: Sat Jul 27, 2013 4:37 pm

Directing returned code to NIL (SOLVED)

Post 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.
Last edited by AmigaPhil on Fri Aug 09, 2013 9:47 pm, edited 1 time in total.
User avatar
gazelle
Posts: 102
Joined: Sun Mar 04, 2012 12:49 pm
Location: Frohnleiten, Austria

Re: Directing returned code to NIL

Post by gazelle »

In AmigaOS 4 the error output must be redirected seperatly with "*>"

Code: Select all

rx >NIL: *>NIL: SpamFryer.rexx
should work
AmigaPhil
Posts: 15
Joined: Sat Jul 27, 2013 4:37 pm

Re: Directing returned code to NIL

Post 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 ?
Post Reply