05-24-2014, 04:23 AM
The latest QM beta has function ExeOutputWindow. I is not console stdout, it is a simple version of QM output pane to be used in exe where QM is unavailable.
If need standard console:
Function OutConsole
If need standard console:
Function OutConsole
;/
function $s
;In exe creates console window and writes string to standard output.
;EXAMPLE
;;/exe
;OutConsole "test"
;OutConsole "test"
;2
#if !EXE
out s
#else
int+ g_stdout
if !g_stdout
,lock
,if !g_stdout
,,AllocConsole
,,SetConsoleTitle "Test Console"
,,g_stdout=GetStdHandle(STD_OUTPUT_HANDLE)
,lock-
_s.from(s "[]")
WriteConsole g_stdout _s _s.len &_i 0