Code: Select all
Function p_printoutput(msg)
ConsolePrint("\n---printoutput---")
ConsolePrint(msg.Output)
EndFunction
Function p_printreturncode(msg)
;ForEach(msg, DebugPrint)
ConsolePrint("\n---printreturncode---\nReturnCode:",msg.ReturnCode)
EndFunction
InstallEventHandler({RunOutput=p_printoutput, RunFinished=p_printreturncode})
Run("C:Type", "S:Startup-sequence",{ReturnCode=True})
Repeat
WaitEvent()
Forever
If I do not install a RunOutput EventHandler, the output is displayed on the terminal I start the program from. If I do install the RunOutput EventHandler, the output is not printed to the terminal and the RunOutput EventHandler p_printoutput is not called.
Tested on AmigaOS 3.2.2.1 with Hollywood 10.0 run from AmigaShell and from CubicIDE.
Works fine on GNU/Linux (Tested on latest Manjaro with Hollywood 10.0)
Thank you very much for the improvements you already made to the Run() function.