Lazarus
Free Pascal => General => Topic started by: iruanpan on May 24, 2022, 02:20:06 am
-
I would like to make a terminal with a Lazarus GUI application. But I'm in trouble. And I hope someone can help me, please.
Question1 was solved with encoding.
Question1: The Chinese and other special chars cannot display normally, I would like to know how to fix this problem.
(code)Class of the thread and "run" button on click event: https://i.stack.imgur.com/ZObEW.png
screenshot: https://i.stack.imgur.com/pymqT.png
Question2: I want to know how to input some command into the console. For example, I would like to start a Minecraft server, and execute a command in the console with TProcess. I tried to start a Windows cmd, and use "ver" command. But when I click the button, nothing happened.
The send command button: https://i.stack.imgur.com/ZfZfC.png
The write function returns 0.
-
I have this project as an interactive test of tprocess:
http://www.stack.nl/~marcov/files/processmemodemo.zip
instructions:
- compile testit.lpr (on cmdline or as "simple program")
- compile the main processtomemo lazaursproject
- Run processtomemo and press the lower button
I hope it helps you in your direction.