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] Set course / depth via keyboard (https://www.subsim.com/radioroom/showthread.php?t=235617)

Werner von Schmidt 11-24-17 12:09 PM

Set course / depth via keyboard
 
Hello,

I'd like to know how it's possible to set a course / depth via keyboard. I am not very skilled in programming, but at least I know it is possible to create sth like that.

Example:
Setting new course 123 by pressing "H+1+2+3".

Maybe someone has the knowledge / an idea to realise it?

Aquelarrefox 11-24-17 01:05 PM

key commands are complex to implement, but as i know its no posible to make a number by keyboard, but if you want to see something similar for ideas, mybe you should check a mod where you can write on a screen notepad, i dont have the link here. But composition of numbers could be imposible... that could be a good improve if you can make it work

Werner von Schmidt 11-24-17 03:12 PM

Quote:

Originally Posted by Aquelarrefox (Post 2527208)
key commands are complex to implement, but as i know its no posible to make a number by keyboard, but if you want to see something similar for ideas, mybe you should check a mod where you can write on a screen notepad, i dont have the link here. But composition of numbers could be imposible... that could be a good improve if you can make it work

My idea is similar. Press a key to open an invisible editbox, type three digits and confirm via enter. So at this point the value goes to the "set_course" or "set_depth" command. I just have no clue how to send the three digits to the set_course / set depth cmd.

The second problem is, that the editbox has to be cleared after the digits have sent to the command.

Aquelarrefox 11-24-17 06:27 PM

KzS_Notepad.7z, serch this, would give you some ideas for a way to enter text as string.

Werner von Schmidt 11-25-17 04:20 AM

Quote:

Originally Posted by Aquelarrefox (Post 2527272)
KzS_Notepad.7z, serch this, would give you some ideas for a way to enter text as string.

To create an edit box item isn't the problem ... my struggle is to write a descent python script to get the input of the edit box and "send" it to Game.SubmarineCommands.ExecuteCommands (set_course etc.).


All times are GMT -5. The time now is 10:11 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.