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 Discussion / input function

Author
Message
zane
21
Years of Service
User Offline
Joined: 23rd Feb 2004
Location: manchester, england
Posted: 18th Mar 2004 16:59
im trying to make myown input function, but ive got a couple of problems.
1 - how would i delete one charicter from a string
2 - how would i test that no keys at all were pressed

www.zaneproductions.tk - lots of games, no Dark basic ones though (yet)!
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 18th Mar 2004 17:10
Use the scancode function in a loop, add a key delay timer to prevent multiple key strokes, edit the string when you detect the key code for Delete.
--
TAZ

zane
21
Years of Service
User Offline
Joined: 23rd Feb 2004
Location: manchester, england
Posted: 18th Mar 2004 18:55
ok. ill go try that. thanks

www.zaneproductions.tk - lots of games, no Dark basic ones though (yet)!
The Dream Keeper!
21
Years of Service
User Offline
Joined: 9th Oct 2003
Location: Netherlands! HOLLAND!
Posted: 18th Mar 2004 21:14 Edited at: 18th Mar 2004 21:14
if backspace()=1 then string$= left$(len(string$)-1, string$)

That should word for the deleting.. or something like it.. haven't tested.. but it should do!

Bring fun to life!!!!!
zane
21
Years of Service
User Offline
Joined: 23rd Feb 2004
Location: manchester, england
Posted: 19th Mar 2004 00:28
thanks both. youve helped me alot

www.zaneproductions.tk - lots of games, no Dark basic ones though (yet)!

Login to post a reply

Server time is: 2025-05-22 21:59:17
Your offset time is: 2025-05-22 21:59:17