Execute with CaptureOutput set to true doesn't returns rc

Find quick help here to get you started with Hollywood
Flinx
Posts: 391
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

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

Post by Flinx »

bitRocky wrote: Sun Sep 20, 2026 4:52 pmIt exists
Sure?
RequesteChoice <> RequestChoice
bitRocky
Posts: 164
Joined: Fri Nov 14, 2014 6:01 pm

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

Post 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"!
Post Reply