Posted: Sat Oct 17, 2009 3:30 pm Post subject: Confused??
Hey i wanted to know how to make a pause like for eg.
Turing:
var pin :int locate(1,30) put"Pin Cracker" put"please enter 10 digit pin number" get pin
put"proccessing"
heres wait i want a pauseto act like it is realy processing XD any ideas?
put"Your 10 digit pin is : ", pin
help me plzz! XD
Sponsor Sponsor
Tony
Posted: Sat Oct 17, 2009 3:36 pm Post subject: RE:Confused??
Posted: Sat Oct 17, 2009 3:38 pm Post subject: RE:Confused??
Instead of a pause, try to make a small loading bar. Pauses (i think you mean the command delay here) are useless and make people irritated when they use your program. Trust me, there's going to be enough pausing if you go into higher programming... where one computation takes like a day to complete (at least on turing).
andrew.
Posted: Sat Oct 17, 2009 4:04 pm Post subject: RE:Confused??
You can use a delay, but it's pointless. If you really want to do it though, use the command "delay (time)" where time is the time in milliseconds it should pause for.
Tony
Posted: Sat Oct 17, 2009 4:27 pm Post subject: RE:Confused??
Posted: Tue Oct 20, 2009 10:49 am Post subject: RE:Confused??
ecookman, notice how you are doing almost the same thing over and over again? Hmm...it's almost like it's repeating itself, defined as repetition. Things happening more than once. What kind of structure makes things happen more than once (repeating itself; repetition)
Turing:
loop put"How the hell will I make this display over and over again?!" endloop
ecookman
Posted: Tue Oct 20, 2009 3:23 pm Post subject: RE:Confused??
Yes, yes that's all nice and good, but what is so horrible about my . .. ... animation. I thought it was clever. >_>
(Wow inscetoid 5 edits...couldn't fit all of that anger at one time eh?)
Insectoid
Posted: Tue Oct 20, 2009 7:26 pm Post subject: RE:Confused??
No..I was trying to make the syntax tag work...
Tony
Posted: Tue Oct 20, 2009 7:39 pm Post subject: Re: RE:Confused??
ecookman @ Tue Oct 20, 2009 3:23 pm wrote:
I thought it was clever.
Repeating the same block of code 6 times is not clever.
You can figure out the number of periods needed with a single for-loop.
Posted: Tue Oct 20, 2009 10:50 pm Post subject: Re: RE:Confused??
Tony @ Tue Oct 20, 2009 9:09 pm wrote:
ecookman @ Tue Oct 20, 2009 3:23 pm wrote:
I thought it was clever.
Repeating the same block of code 6 times is not clever.
You can figure out the number of periods needed with a single for-loop.
Don't forget to mention his code is in a loop, with no exit statement, so it will continue forever unless the program is closed which is not what the poster wanted.
On topic, if you want to make a loading bar you could simply
first, you need to know the Draw.Box command
the Draw.Box syntax is Draw.Box (x1, y1, x2, y2, color) and what it does it is draws a box starting at the position x1,y1 with an ending position of x2,y2 and the color of the box will be what color you specify.
%draws the margins of the loading bar Draw.Box(200, 100, 500, 200, black)
for i :200.. 500%starting from the first x value (x1), going to the second x value (x2) %it will draw a box with the first x changed to whatever the loop number currently is to create an illusion of the bar being filled Draw.Box(i, 100, 500, 200, black) %adds a delay so it seems to be loading delay(25) endfor
You can change "black" to whatever color you want the bar to be (you made need to use the number of the color, for example 10 is light green) and you can change the "starting/ending" x values to change the width of the bar, just be sure to edit the for loop, and change the Y values also to change the height of the bar.
Note: Changing the X and Y values will also move the position of the bar, for example if x1 is 1,and y1 is 1 then the bar will start at 1,1 (bottom left corner) and if x2 is 20, and y2 is 20, the bar will end at 20,20.
-
Sorry if my explanation is terrible, I'm bad at explaining things, I'm working on it though.
Tony
Posted: Tue Oct 20, 2009 11:08 pm Post subject: Re: Confused??
Brandon, your explanation is fine, although the amount of comments seems to be excessive.
Oh, and this reminds me of the old topic from 2003 where we've done some GUI elements, including loading bars (meant for actual loading). Sample screen shot is attached. It's a good thread, though I can't say the same about the actual code anymore.
Posted: Tue Oct 20, 2009 11:21 pm Post subject: Re: Confused??
Okay, I'll cut down on the commenting, was just making sure people could understand exactly what was happening, most of my code doesn't go into very detailed comments like that.