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 / Key Presses

Author
Message
CJD
18
Years of Service
User Offline
Joined: 15th Mar 2006
Location:
Posted: 5th Aug 2006 23:16
Hi, quick question, how do you get around the problem of the user pressing a key once, but the actual action playing numerous times on one key press?

I can't use the WAIT command as this stops my whole programme.

DBPRO newbie
Shark
18
Years of Service
User Offline
Joined: 7th May 2006
Location: The world
Posted: 5th Aug 2006 23:49 Edited at: 6th Aug 2006 01:53
Use a timer of some sort.
Example:

Just edit the "timer#=100000" to your liking.
There is probaly a more efficient way though because this is the only way I know.

My computer specs:1.4 ghz P4,Savage 2000.
(Formerly FPSC PHREAK)
Justin W
20
Years of Service
User Offline
Joined: 28th Apr 2004
Location: Vancouver, Canada
Posted: 6th Aug 2006 06:51
The timer like shark said should work fine. What I usualy do is similer but with a hold variable like so:

Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 6th Aug 2006 08:44
yeah I do what Justin W does, make a flag, so when you press the key it activates and if the flag is active then it won't read it again, but if you release the key then the flag resets.

Pirates of Port Royale
Live the life of a pirate.

Login to post a reply

Server time is: 2024-11-26 13:38:34
Your offset time is: 2024-11-26 13:38:34