*** Delete This thread. I found the answer ***
So you had a problem that others might also have, and you've found the solution. Now you want to keep the solution to yourself? :P
NO,
I did not want to take up server space. I can post the source again if you want.
Anything that could possible help the community could never be called a waste of server space. :)
I understand.
Some sites do complain.
Here is the original source. The problem is that the machine is so fast that it does not increment one at a time. It goes from the first to the last, instantly.
While Not KeyDown(1)
If KeyDown(208) And STLI<(NF-(ENDL-1))
STLI=STLI+1:Cls:Gosub PL:;ENDL=ENDL+1:
ElseIf KeyDown(200) And STLI>1
STLI=STLI-1:Cls:Gosub PL:;ENDL=ENDL-1
EndIf
For Z=1 To 10:Text 200,13*(Z-1),T$(Z):Next:;WaitKey:End
Text 150,0,STLI;VWait
Wend
End
QuoteI did not want to take up server space.... Some sites do complain.
Don't worry about that. If the SSD gets full I'll just buy a bigger SSD ;D - Keep posting :)
Yes, but at some point the cost has to be ridiculous and then where would the information go?
Quote from: Mikey on December 03, 2018, 00:11:30
Yes, but at some point the cost has to be ridiculous and then where would the information go?
An even bigger drive :P
It will bankrupt you in the very long run.
Every byte counts !!!11!!!!!1
Once Mikey posted his 1.000.000.000 post he will occupy ~ 1kb * 1.000.000.000 = ~100 gigabytes on your SSD. Assume he does not "bot-post" but manual post and needs about a minute to write some stuff then he will have filled your SSD/hard drive in just about 695.000 days. I assume when this moment comes, 100 gigabytes of space won't cost uhm "that much" ;-)
@ keydown
The problem is that "keydown" is emitted as soon as a key is "kept down" and the code handling the OS events is run. So on your fast computer it runs runs runs runs runs ... and always it sees "key is down -> keydown becomes true".
Solution is to have some kind of "keyHit" (becomes "true" once it _was_ keydown but now is _no_longer_ keydown). Or you add your own "KeyPress()". Means you store when KeyDown/KeyHit/... events for a special key happen. Then add your own timing code (eg. you can only "keyPress" once every X milliseconds). This also allows for "repeat key strokes"). You while the user keeps pressing a key ("keyDown=true everytime") you store a "keyDownTime = Millisecs()" thing as soon as "keyDownTime - lastKeyDownTime > xxx". If you update "lastKeyDownTime" then to the current time it will emit it next time once "xxx" time has passed. This allows then to keep it pressed but only emit a "keystroke" every xxx time.
bye
Ron
This was the solution that I used:
While Not KeyDown(1)
CH=GetKey()
If CH<>0
If KeyDown(208) And STLI<(NF-(ENDL-1))
STLI=STLI+1:Cls:Gosub PL:;ENDL=ENDL+1:
ElseIf KeyDown(200) And STLI>1
STLI=STLI-1:Cls:Gosub PL:;ENDL=ENDL-1
EndIf
For Z=1 To 10:Text 200,13*(Z-1),T$(Z):Next:;WaitKey:End
EndIf
Wend
It does not emit a repeating key press if the key is held down though