can someone ell me how to get input from a console app? in Mk2

Started by mainsworthy, August 04, 2024, 01:42:06

Previous topic - Next topic

mainsworthy

can someone ell me how to get input from a console app? in monkey 2

Print seems to write to it, but i how do you scan for input.

mainsworthy

i can code input from keyboard, but thats not what i need, I want to read stdout stdin and output to them, I am adding external apps to interact that use stdout

dawlane

How good is your knowledge of C and how Monkey2 binds to external functions?
You will need to write your own routines to interact with stdin, stdout and stderr. And depending on how you are interacting with each application.
You'll need knowledge on how to get processes to communicate with each other. The most used is possibly that of the pipes.

Edit:
After a check. There is a class in Monkey2 that deals with processes. But the documentation probably follows BRL's normal modus operandi of being virtually non existent or incomplete and no examples.

mainsworthy

thanks, I found New console etc.. in mk2 but cant read or write to it, i will keep plugging

I got a console to start, but thr run command takes a command string and i have no idea

i used mojox

new console
run
write
read,

but got nothing.

I cut the project to a console app, and i can print to the console, but cant read

i have done pipes a bit in c++ but i dont want to program in c++ here

mainsworthy

i remember doing it in blitzplus, i will pull the code, thanks