Page 1 of 1

Pushing Commands to Window Console via Script

Posted: Fri Jul 26, 2019 7:50 pm
by tycox94@gmail.com
I have a server that runs in a windows console. I am trying to write a python script that will enter information into the game's server console. How can this be done?

Re: Pushing Commands to Window Console via Script

Posted: Sat Jul 27, 2019 11:22 am
by irei1as
The easiest way would be to use an external text file that is written by the py and read by the exe in intervals but it may end with access issues if they both try to use it at the same time.

Re: Pushing Commands to Window Console via Script

Posted: Wed Jul 31, 2019 8:53 am
by LukasPJ
I used a local network connection in order to connect to Python with c# (my Torque script).
You could explore something similar?

Depends on your use case, but network connection is pretty painless and not an unusual solution

Re: Pushing Commands to Window Console via Script

Posted: Tue Aug 06, 2019 7:33 am
by GuyA
If the telnet console is still part of the engine, you could use the python library telnetlib to interact with the server.
Telnet is not secure, so don't go accessing remote machines with it, it will be Ok for use on a lan.