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 / Hit The Same Key Twice

Author
Message
Gilden
20
Years of Service
User Offline
Joined: 10th Aug 2004
Location:
Posted: 16th Aug 2005 19:04
This is what I want to do, and I can't do it. I want to hit the shift key once and it draws random circles. Then when I hit the shift key again it stops, and hit it again it starts.

I can't seem to be able to use the same key twice for a differnt action.


Please Help,


Gilden
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Aug 2005 19:29 Edited at: 16th Aug 2005 19:30
This might be what you want.

Not sure how you are getting your shift key but something like this will work



I'm not getting you down am I, Ho Look! another fancy Door?
Gilden
20
Years of Service
User Offline
Joined: 10th Aug 2004
Location:
Posted: 16th Aug 2005 19:55
Thanks for the help, but I am still having a problem:

I want to beable to stop and start drawing random circles on screen using one key on the keyboard. This is the code I have.


If you need more explanation of my problem, please let me know.


Gilden
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 16th Aug 2005 20:12


or if you just want to draw ONE circle each time that shift is pressed then change

if shift=1
circle rnd(600),rnd(400),rnd(40)
endif

to read

if shift=1
circle rnd(600),rnd(400),rnd(40)
shift=0
endif

hope that helps.

Gilden
20
Years of Service
User Offline
Joined: 10th Aug 2004
Location:
Posted: 16th Aug 2005 21:00
Thankyou. That's exactly what I needed

Login to post a reply

Server time is: 2024-09-24 01:33:38
Your offset time is: 2024-09-24 01:33:38