Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / input problem

Author
Message
Mizipzor
20
Years of Service
User Offline
Joined: 24th May 2004
Location: Sweden
Posted: 12th Jun 2004 17:24
hi

im trying to write kinda a text editor. the problem is if i use the input command then i need to press enter before i can read what was pressed. if i want to read which character the user typed everytime something is typed how do i do that?

i kinda sucks to have to press enter after each character is pressed in a text editor.


in theory

do

check which key was press, store in char$
if char$ <> 0 then process_input()

loop

Dreaming of creating a highly advanced AI mind
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th Jun 2004 17:33 Edited at: 12th Jun 2004 17:33
You can either use the INKEY$() function, or the ENTRY$() function with CLEAR ENTRY BUFFER

You can find an example of the ENTRY$() way here : http://developer.thegamecreators.com/?m=codebase_view_code&i=4c2ab9b620f37a56011f61e34c261fcc

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Mizipzor
20
Years of Service
User Offline
Joined: 24th May 2004
Location: Sweden
Posted: 12th Jun 2004 18:08
thanks, that sorted it out. posted another thread with my next problem

Dreaming of creating a highly advanced AI mind

Login to post a reply

Server time is: 2024-11-26 20:38:10
Your offset time is: 2024-11-26 20:38:10