Log in

View Full Version : [TEC] Set course / depth via keyboard


Werner von Schmidt
11-24-17, 12:09 PM
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
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
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.).