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.

DarkBASIC Professional Discussion / I need some help please (man I say that alot)!

Author
Message
Maverick
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 4th Nov 2002 04:34
This is the basis for a simple notepad program that I am in need of completing but I keep running into the same problems I can get the Return key to work but when using the backspace it eats all of the data instead of one letter at a time. Im so close I can taste it! If someone could take a look at the code and tell me whats going wrong my life would be so much better!

Thanks

Dim typing$(20)
set text size 16

Ratty Rat
21
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 4th Nov 2002 13:46
Sorry but this bit of code makes no sense, apart from anything else it contains several syntax errors, which will stop it compiling.

Why not just copy and paste the offending bit of code in here (this looks almost like you typed it in again from memory).

If you can post code that at least compiles I am sure someone here will help (me if I`m on-line).
Maverick
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 5th Nov 2002 02:13
Its ok I fixed it. I got it to work but the problem I am running into is that it wont work on different systems, This version of the program works quite well on my 2ghz system but, Not very well on my 1ghz, I keep hitting the same wall when trying to get the Delete/Return key to only run once every time it is pushed instead of 10 times. Here is the code.




Ratty Rat
21
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 5th Nov 2002 14:26
Below is a version that should work the same on any PC, instead of counting the number of cycles the key has been pressed for it uses the system timer to wait an exact number of milliseconds before repeating.

It also occurred to me that you could use this to do a longer delay after the first character and then fast repeat (like normal) so I added that in to

Maverick
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 5th Nov 2002 23:10
Thank you very much! This has been bugging me for the past week, awsome! thanks again!

Login to post a reply

Server time is: 2024-05-28 02:10:22
Your offset time is: 2024-05-28 02:10:22