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 / Problems creating multiple boxes

Author
Message
squids
21
Years of Service
User Offline
Joined: 1st May 2003
Location: United Kingdom
Posted: 29th Dec 2004 01:25 Edited at: 29th Dec 2004 01:32
Hey there,

I have been having some difficulty today, being the christmas holidays and all I have had some drink, not being a pro drinker I seem to have lost most if not all of my brain-cells. It took me a while to get more than one box to appear on the screen and now I cant figure out how to make my count variable increase by one per click and not a bazillion if you have you fingure on the mouse for more than a second. Hope you understand what I mean. hopefully the code follows below;



I hope you get the idea, thanks in advance
Squids.


Edit: I can add a sleep 100 to make the boxes appear slower but I am not sure what to do about the fact that if you keep clicked for more than the sleeps length you will increase the count :/ sorry,.

.Arf..
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 29th Dec 2004 01:34
try putting the

if mouseclick()=1 : count=count+1
left(count)=x : top(count)=y : right(count)=x+11 : bottom(count)=y+11
endif

outside of the frist lot of for next loops,
place just before

for x=1 to count
box left(x),top(x),right(x),bottom(x)
next x

your count will now go up when you press the mouse button

In Space No One can Hear You Scream! (When your comm Line is cut?)
squids
21
Years of Service
User Offline
Joined: 1st May 2003
Location: United Kingdom
Posted: 29th Dec 2004 02:06
Thanks for the response HowDo,

But that has the exact same effect :/ I can use the sleep command after the count has been increased which causes it all to slow up so one click is equal to a click as long as you dont keep the button pressed for more than a second >.< it should become obvious at some point ..I hope

thanks very much.

.Arf..
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 29th Dec 2004 02:23


I think that should work...

Am I the only one here who's really confused?
squids
21
Years of Service
User Offline
Joined: 1st May 2003
Location: United Kingdom
Posted: 29th Dec 2004 03:02
Good thinking Demon thanks for that

.Arf..

Login to post a reply

Server time is: 2024-11-27 18:48:31
Your offset time is: 2024-11-27 18:48:31