SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   [TEC] KzS Notepad (https://www.subsim.com/radioroom/showthread.php?t=221973)

GT182 09-23-15 01:56 PM

Excellent mod! :yeah: :salute: Even if does have a high learning curve it's well worth it.

LGN1 09-24-15 07:24 AM

Hi Tycho,

is it possible to have a default message in the textbox (via menu.txt) which can be replaced by your own message? This might offer a way to save the text.

Regards, LGN1

LGN1 09-24-15 08:59 AM

Hi,

I think I have a solution to save the text:

- Use Autohotkey to log your key strokes during game-play
- Evaluate and process this log file with a script
- Use, e.g., SH3Commander to add the text back into SH3 via *_menu.txt for a chosen save-game (if necessary change the text box parameters, too).

For convenience this could be put into a single script.

This should all be straight-forward, however, it would require quite some coding...

Regards, LGN1

sublynx 09-24-15 09:15 AM

With a proper Autohotkey script one could type something like this:

#BE1742 1414 A 3000 GRT merchant spotted 174°##

# meaning Start text
## meaning End text

??

So I could write and save a war diary many pages long with the help of an Autohotkey script and the KzS Notebook?

Would it be possible to also have the script to save the text as a Word file?

Tycho 09-24-15 03:02 PM

Quote:

Originally Posted by LGN1 (Post 2346822)
is it possible to have a default message in the textbox (via menu.txt) which can be replaced by your own message? This might offer a way to save the text.

Yes! Add in menu_1024_768.ini for the edit box "Text=any number" which leads to en_menu.txt. There write what you want, and the text will be in that edit box when start the game. In the game you can edit this text, but in en_menu.txt will stay original text.


Quote:

Originally Posted by LGN1 (Post 2346421)
It would be a nice addition to the radio message screen in combination with the enigma. One could then write down the decrypted letters in-game.

Yes, I was thinking of adding one edit box for radio message screen. And if manipulated the font files, it is possible to type letter on keyboard and to appear different letter in the box. I'm going to do it, but when have time.


As for the script, it is too occupation for me. I continue to write log book on paper after patrol, I just want opportunity for quick notes in game.

areo16 09-25-15 12:31 AM

Quote:

Originally Posted by Tycho (Post 2346909)
Yes! Add in menu_1024_768.ini for the edit box "Text=any number" which leads to en_menu.txt. There write what you want, and the text will be in that edit box when start the game. In the game you can edit this text, but in en_menu.txt will stay original text.


But game must be completely restarted to see changes of en_menu.txt file. This isn't that ideal.

Best solution would be to write to memory address. Look into CheatEngine and find the pointer to the text edit box and then put in the saved log string there. Do you guys have experience with reading and writing to memory locations of a running executable?

Tycho 09-25-15 03:28 AM

Quote:

Originally Posted by areo16 (Post 2346960)
Do you guys have experience with reading and writing to memory locations of a running executable?

No! And don't want to. I achieved what I wanted - possibility for quick and short notes in game. I make screenshot with these notes and then, after patrol I write logbook on paper, with help from these notes.
The rest, I'll leave it in the hands of who has experience with what you are talking about.

areo16 09-25-15 04:46 PM

Quote:

Originally Posted by Tycho (Post 2346969)
No! And don't want to. I achieved what I wanted - possibility for quick and short notes in game. I make screenshot with these notes and then, after patrol I write logbook on paper, with help from these notes.
The rest, I'll leave it in the hands of who has experience with what you are talking about.

Understood.

However, your idea opens up the door to many other possibilities. If we can get a method to save the notes. Screenshots aren't ideal for everyone. We can expand this to other things like captain diaries and such. I know a bit about it but am occupied with my two jobs and I'm a fulltime student.

I'd be willing to guide anyone who wants to take on this memory method. I know how you can learn it fast and help put it together.

LGN1 09-26-15 02:36 PM

Hi Tycho & Areo16,

I agree my solution would not be the ideal solution, however, it would work (at least for my style of playing because I always play only one career during a gaming session/loading).

Anyway, I don't have time and I'm too lazy to write the script. The same applies to implementing anything involving writing to memory...

@Tycho: Concerning your remark about the font: Do you mean to make a new font for the notepad at the radio screen so that if you press the letter of the encrypted message you see the decrypted letter on the notepad? That's a very nice idea and would speed up the process of decryption quite a bit (but avoiding your nice enigma machine :wah:) !

Regards, LGN1

areo16 09-26-15 03:17 PM

Quote:

Originally Posted by LGN1 (Post 2347254)
Hi Tycho & Areo16,

I agree my solution would not be the ideal solution, however, it would work (at least for my style of playing because I always play only one career during a gaming session/loading).

Anyway, I don't have time and I'm too lazy to write the script. The same applies to implementing anything involving writing to memory...

I hear ya. I guess I'll just have to put it on my ever expanding to-do list.

How about the other problem of one line text edits? Now you have to click on the next line to type on the next line.

Is there anywhere in the game that has a multi-line text edit area? Not just a one line text edit line. If exists, we could use that menu item id.

Tycho 09-26-15 03:54 PM

Quote:

Originally Posted by LGN1 (Post 2347254)
@Tycho: Concerning your remark about the font: Do you mean to make a new font for the notepad at the radio screen so that if you press the letter of the encrypted message you see the decrypted letter on the notepad? That's a very nice idea and would speed up the process of decryption quite a bit (but avoiding your nice enigma machine :wah:) !

Yes, exactly! Will do it the next week.

Quote:

Originally Posted by areo16 (Post 2347261)
How about the other problem of one line text edits? Now you have to click on the next line to type on the next line.

Is there anywhere in the game that has a multi-line text edit area? Not just a one line text edit line. If exists, we could use that menu item id.

It is possible to edit on every line. But the cursor is not visible after first line, and this makes the editings more tricky. And the impossibility to go for new line, when you want, makes the multi-line edit box even more tricky for use.

areo16 09-26-15 04:18 PM

Quote:

Originally Posted by Tycho (Post 2347266)
It is possible to edit on every line. But the cursor is not visible after first line, and this makes the editings more tricky. And the impossibility to go for new line, when you want, makes the multi-line edit box even more tricky for use.

What is the menu id number for multi-line edit box?
Not seeing cursor makes it difficult but not impossible. Finding cursor location can be done by deleting or adding one character. If you click on the second line on the right side of the text and it has text on the second line, wont the cursor go to the end of the text? Even though it is invisible.

ExFishermanBob 09-26-15 05:06 PM

Quote:

Originally Posted by areo16 (Post 2347261)
I hear ya. I guess I'll just have to put it on my ever expanding to-do list.

How about the other problem of one line text edits? Now you have to click on the next line to type on the next line.

Is there anywhere in the game that has a multi-line text edit area? Not just a one line text edit line. If exists, we could use that menu item id.

Are you thinking - "enter some known text" then scan the memory (of the running program) to find out where it lies? If the notepad was started with some fixed (known) text (like "KzS Notepad") it might be easy enough even at run-time. I suspect the problem might be detecting the end of the text (unless you had a fixed-size allocation for any notepad text with an end-marker as well).

Tycho 09-26-15 05:12 PM

Quote:

Originally Posted by areo16 (Post 2347272)
What is the menu id number for multi-line edit box?

The same, there has only the one edit box in the game and it is Type=1035.
Make it bigger and give it more TextMaxLen=xxxx, and you will have multi-line edit box.

Quote:

Originally Posted by areo16 (Post 2347272)
Not seeing cursor makes it difficult but not impossible. Finding cursor location can be done by deleting or adding one character.

Yes, I know! I experimented a lot with these things. And because of that, I reached to the decision to divide it into separated lines with numerous edit boxes.

Quote:

Originally Posted by areo16 (Post 2347272)
If you click on the second line on the right side of the text and it has text on the second line, wont the cursor go to the end of the text? Even though it is invisible.

Not possible:
One click with the mouse over - opens edit box.
Second click with the mouse - closes edit box.
But, works with Home, End and Arrow keys.

areo16 09-27-15 02:46 AM

Quote:

Originally Posted by ExFishermanBob (Post 2347280)
Are you thinking - "enter some known text" then scan the memory (of the running program) to find out where it lies? If the notepad was started with some fixed (known) text (like "KzS Notepad") it might be easy enough even at run-time. I suspect the problem might be detecting the end of the text (unless you had a fixed-size allocation for any notepad text with an end-marker as well).

Well if its a multiline text edit box then wont there be a pointer somewhere to an allocated space big enough to hold enough characters to fill that whole multiline text edit box?


All times are GMT -5. The time now is 10:47 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.