How do I simulate a terminal/CMD ??

Get help using Construct 2

Post » Mon Nov 21, 2016 6:12 am

im trying to make a terminal/cmd like textbox, i already tried a lot of things but basically what i want to do is literally emulate a terminal, i know already how to make a textbox recognize text so i can create my own "commands" but what im having problems is typing, if i could only make the textbox object so users wont be able to erase what the terminal write and at the same time they could write on the terminal it will be amazing, thats basically all i need.

being able to write on the textbox but not to erase text that is not in my line...

a way to do it is by having 2 textbox, one for typing and one for the "console", but i dont want 2 textboxs, i NEED all to be happening in 1
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Mon Nov 21, 2016 10:09 am

Maybe you can do it with an ASCII-Table and the key-codes.
I made a little example:
https://drive.google.com/file/d/0B5FlDY ... sp=sharing

It doesn't scroll or delete lines, if the textbox is full you don't see any more commands.
If you want more characters for input you have to extend it yourself, at the moment you can only use letters and numbers.
Use this ASCII-Table:
http://www.chip.de/ii/1/2/5/4/9/5/8/0/a ... 9f26b0.png
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Mon Nov 21, 2016 6:51 pm

Asmodean wrote:Maybe you can do it with an ASCII-Table and the key-codes.
I made a little example:
https://drive.google.com/file/d/0B5FlDY ... sp=sharing

It doesn't scroll or delete lines, if the textbox is full you don't see any more commands.
If you want more characters for input you have to extend it yourself, at the moment you can only use letters and numbers.
Use this ASCII-Table:
http://www.chip.de/ii/1/2/5/4/9/5/8/0/a ... 9f26b0.png



thats a really nice capx and will help me with my reserach! thanks!!, the thing is that it can delete lines :/
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Mon Nov 21, 2016 6:57 pm

B
66
S
24
G
7
Posts: 1,515
Reputation: 11,041

Post » Mon Nov 21, 2016 7:08 pm

Thanks!!!!! this work perfect!!! the only thing i would like to add is spaces haha since i cant type "_" hmmm
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Mon Nov 21, 2016 7:21 pm

figured out :P

Image

(thats space bar in spanish), same must be done with the INPUT variable, just without the new line.
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Tue Nov 22, 2016 5:17 pm

@Koorbach
That's pretty nice !
How do you scroll content when bottom line is reached ?
And what are the Commands and Shell arrays for ?
B
35
S
14
G
5
Posts: 239
Reputation: 5,623


Return to How do I....?

Who is online

Users browsing this forum: diamantico21, ratboy3, TRMG and 31 guests