Yes I see.
Here is some console code for OxygenBasic/tools/toolSrc. It shows how to setup simple console i/o.
I think you need to make a call to kernel32.dll
%STD_OUTPUT_HANDLE = -11
ConsOut=GetStdHandle (%STD_OUTPUT_HANDLE)
library "KERNEL32.DLL"
declare FUNCTION AllocConsole ALIAS "AllocConsole" () AS LONG
declare FUNCTION GetCommandLine ALIAS "GetCommandLineA" () AS DWORD
declare FUNCTION GetStdHandle ALIAS "GetStdHandle" (BYVAL handle AS DWORD) AS DWORD
declare FUNCTION WriteConsole ALIAS "WriteConsoleA" (BYVAL hConsoleOutput AS DWORD, lpBuffer AS ASCIIZ, BYVAL nNumberOfCharsToWrite AS LONG, lpNumberOfCharsWritten AS LONG, BYVAL lpReserved AS LONG) AS LONG
declare FUNCTION ReadConsole ALIAS "ReadConsoleA" (BYVAL hConsoleInput AS DWORD, BYVAL lpBuffer AS DWORD, BYVAL nNumberOfCharsToRead AS LONG, lpNumberOfCharsRead AS LONG, pInputControl AS ANY) AS LONG
declare FUNCTION SetConsoleTitle ALIAS "SetConsoleTitleA" (lpConsoleTitle AS ASCIIZ) AS LONG
library ""
%STD_INPUT_HANDLE = -10
%STD_OUTPUT_HANDLE = -11
%STD_ERROR_HANDLE = -12
AllocConsole
dim as long consIn,consOut,consErr
ConsIn =GetStdHandle (%STD_INPUT_HANDLE)
ConsOut=GetStdHandle (%STD_OUTPUT_HANDLE)
ConsErr=GetStdHandle (%STD_ERROR_HANDLE)
dim as string bufin
dim as long buflen,bufrit
dim as string tab,cr,qu
tab=chr 9
qu=chr 34
cr=chr(13)+chr(10)
bufin=nuls 1000
SetConsoleTitle "Oxygen PE SPY"
'---------------------------
function output(bufout as string)
'===========================
buflen=len bufout
WriteConsole ConsOut,bufout,buflen,bufrit,0
end function
'-------------------------------------
function input(s as string) as string
'=====================================
output s
ReadConsole consin,*bufin,100,bufrit,0
function=left bufin,bufrit
end function
'-------------------------------
function commandline() as string
'===============================
dim byref z as zstring
&z=GetCommandLine
function=z
end function
'------------------------------------------
function stripquotes(s as string) as string
'==========================================
dim as long a
a=asc(s,1)
if a=34 then
a=instr 2,s,qu
s=mid s,2,a-2
end if
function=s
end function
Charles