Console Text Capture

1 year 11 months ago - 1 year 11 months ago #1 by Stern
Console Text Capture was created by Stern
Im finishing the console text capture program.
(As I remember this function was planned to be in the RSC but JonnySniper could'nt find out correct addresses for the text running in the console)
Its dynamic address, so yes it can be complicated.

But now I have a question for admins, the ones who set up servers.

Which would be better way to select the desired console for the Text Capture program.
1.Selecting it from the program GUI (drop-down menu, showing running applications).
2.Setting the server name from Settings file.
3.Giving it as a command line argument (usually done by editing the file shortcut "target" line).
First one in quick, second and third lets you load it on start, just start program and it runs, but if the server name is changed then it requires to change it also in the settings file or in the Shortcut target textfield.
(Right now its made with option 1)

Program saves every new line to text file (line that is different from previous one).
Every line will be saved with time and date.
File name is automatic, same as selected console name (title).
It also has a Filter function to discard some unpractical lines like "Enemy killed..." or maybe some automatic text that goes round avary 5 min, starting with "ADMIN: "
Its just to save space in the log file.


The one who hesitates is lost !
Attachments:
The following user(s) said Thank You: snowman, toadlife

Please Log in or Create an account to join the conversation.

1 year 11 months ago #2 by toadlife
Replied by toadlife on topic Console Text Capture
The ability to launch it with a command line with server name is a must. I would totally use this on my server to automate things. I've thought of writing an admin "Bot" that would handle voting and load maps requested by players. The only roadblock is that I didn't know how to capture the console text!

Please Log in or Create an account to join the conversation.

1 year 11 months ago #3 by Stern
Replied by Stern on topic Console Text Capture
How this bot will work to manipulate voting ?
Then it must have some command in chat text that you can capture and then select desired mission.
I can make this program to send commands to selected console, with send-key function it wasnt so hard as i remember.

toadlife wrote: The only roadblock is that I didn't know how to capture the console text!

Edit01.Text:='';
 ReadProcessMemory(PHandle, Ptr(BaseAddress), Addr(Buf1), SizeOf(Buf1), X);
 ReadProcessMemory(PHandle, Ptr(Buf1+$30), Addr(Buf1), SizeOf(Buf1), X);
 ReadProcessMemory(PHandle, Ptr(Buf1+$0), Addr(Buf1), SizeOf(Buf1), X);
 ReadProcessMemory(PHandle, Ptr(Buf1+$8), Addr(Buf1), SizeOf(Buf1), X);
 ReadProcessMemory(PHandle, Ptr(Buf1+$0), Addr(Buf0), SizeOf(Buf0),X);
  SetString(StrOut, PAnsiChar(@Buf0[0]), SizeOf(Buf0));
  Edit01.Text:=LeftStr(StrOut, 44);

its just a small part of it ;)

The one who hesitates is lost !
The following user(s) said Thank You: snowman, toadlife

Please Log in or Create an account to join the conversation.

1 year 11 months ago #4 by Stern
Replied by Stern on topic Console Text Capture
I cannot understand how you going to handle all this.
Voting doesnt show up in Console, so you really cannot use the built-in voting.
If you make very simple way to select missions then in the middle of a mission someone can load new one, just to spoil the party.
For in-chat voting you must use complicated filtering to get all confirmations from all players that they agree to load new mission.

Maybe you have some simple solution for all that ?

The one who hesitates is lost !
The following user(s) said Thank You: toadlife

Please Log in or Create an account to join the conversation.

1 year 11 months ago #5 by toadlife
Replied by toadlife on topic Console Text Capture
The idea in my head was to set it up so that players could request a particular map via chat. It would be like a simple "chat bot" kind of thing.

The players would need to use a special keyword, like "admin" to get the chat bot to pay attention.

Player1: Admin load map Brest
Bot: player1, do you want to load the map "Brest"? say "yes" to confirm.
player1: yes
Bot: Attention: Player1 wants to load the map Brest. If you agree please say "yes." If you disagree, say nothing or "no"
player1: yes
player2: yes
player3:....
Bot: Loading map Brest...


Parsing the text would absolutely be tricky, but it would be a fun thing to try to do.

Please Log in or Create an account to join the conversation.

1 year 11 months ago #6 by Stern
Replied by Stern on topic Console Text Capture
Ok yes it can work this way but still it has a problem that it requires 2 programs to make it work.
This should be built info my program or you have to write your program to be able to read out text from console...

In what language you planned to code this ?
Mine is coded in Embarcadero RAD Studio 2010, it uses C++ and ObjectPascal, i use Pascal.

The one who hesitates is lost !

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Next birthdays

  • iBeLKa birthday is in 1 day (28)
  • 43 birthday is in 4 days (54)
  • Soukyan birthday is in 8 days (21)
 
 
 

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.