Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Snippet - "Type Writer" Effect in the Console

I couldn't remember if I posted this or not, so I tried searching and going through all the threads I posted and couldn't find anything so I decided to post it.

I was going through one of my old projects and saw that it used this.

Picture:
[img]http://www.coding-forums.com/hf/imgs/typewriter.gif[/img]

Snippet:
Code
Dim theString$ = "Some string."
For Each c As Char In theString.ToCharArray
Console.Write(c)
System.Thread.Thread.Sleep(43)
Next
'Console.ReadLine()

I always thought this was pretty cool. I hope y'all do too.

Have fun!
Thread: Backend Web-Dev. - by SomeWhiteGuy

WATCH OUT 'LIL HOE,
MY PARTNA STILL SMOKE ON PAROLE
selling -
megabits.org + freakin.pro
This is Actually pretty cool, Thanks for showing this, :)
[Image: JHrV2.gif]
I am interested why you choose the number 43 :)
(Jul 8, 2012 05:38 PM)Ron. Wrote:  This is Actually pretty cool, Thanks for showing this, :)

Thanks. :D

(Jul 8, 2012 05:43 PM)Ethernal Five Wrote:  I am interested why you choose the number 43 :)

Idk honestly, lol. I just fucked around with it for a little while and decided 43 looked just about perfect for my personal preference, lmao.
Thread: Backend Web-Dev. - by SomeWhiteGuy

WATCH OUT 'LIL HOE,
MY PARTNA STILL SMOKE ON PAROLE
selling -
megabits.org + freakin.pro
I always enjoyed using sleeps in console applications. (Odd thing to say?)
I figured there would be a more proper way but I guess it's this.
Except I did it manually, but thanks for this.
(Jul 8, 2012 06:06 PM)Killer1478 Wrote:  I always enjoyed using sleeps in console applications. (Odd thing to say?)
I figured there would be a more proper way but I guess it's this.
Except I did it manually, but thanks for this.

No problem. Glad you like it.

I tried thinking of a different way to do it, because like you I thought there would be a more legit way but I couldn't think of anything, lol.
Thread: Backend Web-Dev. - by SomeWhiteGuy

WATCH OUT 'LIL HOE,
MY PARTNA STILL SMOKE ON PAROLE
selling -
megabits.org + freakin.pro
Surprised nobody's bashed you for this, it's very unimpressive. Ah damn I hate the syntax when people use symbols to explicitly specify a type "$" for string etc, very unreadable in my opinion. Don't know if you know already but the compiler doesn't require you to explicitly define a type when you use the 'Dim' keyword. If you where to type for example, "Dim TheLights = false" and hovered your mouse over 'Dim' it'd indicate that it knows that the object was of type boolean. I'm only putting that out there because I guess your justification, or anybody else's for that matter for using these characters to define a type is that it shortens code / is easier to type when in fact you can make it shorter yet while not using what I imagine are depreciated methods.
(Jul 8, 2012 07:13 PM)+Bourbon Wrote:  Surprised nobody's bashed you for this, it's very unimpressive. Ah damn I hate the syntax when people use symbols to explicitly specify a type "$" for string etc, very unreadable in my opinion. Don't know if you know already but the compiler doesn't require you to explicitly define a type when you use the 'Dim' keyword. If you where to type for example, "Dim TheLights = false" and hovered your mouse over 'Dim' it'd indicate that it knows that the object was of type boolean. I'm only putting that out there because I guess your justification, or anybody else's for that matter for using these characters to define a type is that it shortens code / is easier to type when in fact you can make it shorter yet while not using what I imagine are depreciated methods.

I respect your opinion, but that's all it is, an opinion.

Thank for your comment.
Thread: Backend Web-Dev. - by SomeWhiteGuy

WATCH OUT 'LIL HOE,
MY PARTNA STILL SMOKE ON PAROLE
selling -
megabits.org + freakin.pro
(Jul 9, 2012 03:14 PM)SomeWhiteGuy Wrote:  I respect your opinion, but that's all it is, an opinion.

Thank for your comment.

Its even less then an opinion, its an preference.
(Jul 9, 2012 03:23 PM)Ethernal Five Wrote:  Its even less then an opinion, its an preference.

That too. Couldn't think of the work atm, lol.
Thread: Backend Web-Dev. - by SomeWhiteGuy

WATCH OUT 'LIL HOE,
MY PARTNA STILL SMOKE ON PAROLE
selling -
megabits.org + freakin.pro
Yea. 43. What a random choice of a number. Hahaha. You should make it play a key stroking sound when it happens.
(Jul 9, 2012 03:52 PM)Cody8295 Wrote:  Yea. 43. What a random choice of a number. Hahaha. You should make it play a key stroking sound when it happens.

It is pretty fucking random. I just think that it's about perfect for the effect, lol.

That would be pretty awesome, lol.
Thread: Backend Web-Dev. - by SomeWhiteGuy

WATCH OUT 'LIL HOE,
MY PARTNA STILL SMOKE ON PAROLE
selling -
megabits.org + freakin.pro
Yeah, the compiler is smart enough to automatically assign a type to a variable, like some other languages, but that is not a good practice IMO.

Nice little release you have here.

Kik - Krookedlabratories
This is quite simple, but unique. Cool idea and nice share :D
I have seen a few members use a suffix character to define datatypes. I try to get members to avoid legacy code but this goes back way beyond Microsoft and Visual Basic. This is BASIC. I can't personally see any appeal in using a single suffix. Each to there own though :)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by еlixirSep 9, 2022 06:31 AM 0 132 Sep 9, 2022 06:31 AM
Last Post: еlixir
[C] by maryousJul 24, 2022 03:35 PM 0 160 Jul 24, 2022 03:35 PM
Last Post: maryous
[Python] by datguy.devNov 28, 2019 10:37 PM 4 297 Nov 28, 2019 10:37 PM
Last Post: Eternal Darkness