Page 2 of 2

Re: Execute with CaptureOutput set to true doesn't returns rc

Posted: Sun Sep 20, 2026 6:39 pm
by Flinx
bitRocky wrote: Sun Sep 20, 2026 4:52 pmIt exists
Sure?
RequesteChoice <> RequestChoice

Re: Execute with CaptureOutput set to true doesn't returns rc

Posted: Sun Sep 20, 2026 6:57 pm
by bitRocky
Ops, sorry.

Code: Select all

@VERSION 11,0

rc, out = Execute("c:RequestChoice", "Hallo", {CaptureOutput=True})
DebugPrint("rc = "..rc)
	DebugPrint("out = "..out)
If rc = 0
	DebugPrint("Successful")
Else
	DebugPrint("Failed!")
Endif

Code: Select all

0:00.02 [ 0] Dev:Hollywood/my/> Tests/Execute.hws
rc = 0
out = RequestChoice: Gefordertes Argument fehlt
c:RequestChoice fehlgeschlagen Rückgabewert 20

Successful
0:00.44 [ 0] Dev:Hollywood/my/> 
Here you see, Execute() also returns 0, if I "forgot" a required argument, although DOS returns 20.
This on MorphOS.

If I compile the script for classic, I get "rc = 20" and a "failed"!
So a classic/68k exe works (on MorphOS) as expected, but a MorphOS exe doesn't"!